fix school dialog option
This commit is contained in:
@@ -31,16 +31,16 @@ public class EducationItemUI : MonoBehaviour, IDialogItemUI ,IPointerEnterHandl
|
||||
_price.text = $"{_item.EnrollPrice}$";
|
||||
_icon.sprite = item.Icon;
|
||||
_button.enabled = true;
|
||||
_button.onClick.AddListener(() => {
|
||||
if (_button.enabled)
|
||||
{
|
||||
_parent.OnItemSelected(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void Click()
|
||||
{
|
||||
if (_button.enabled)
|
||||
{
|
||||
_parent.OnItemSelected(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
|
||||
@@ -28,17 +28,13 @@ public class JobItemUITemplate : MonoBehaviour, IDialogItemUI ,IPointerEnterHan
|
||||
_sallary.text = $"{_item.Salary}$";
|
||||
_icon.sprite = item.Icon;
|
||||
_button.enabled = Player.Instance.Education>= _item.MinimumEducationSkill;
|
||||
_button.onClick.AddListener(() => {
|
||||
if (_button.enabled)
|
||||
{
|
||||
_parent.OnItemSelected(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void Click()
|
||||
{
|
||||
if (_button.enabled)
|
||||
{
|
||||
_parent.OnItemSelected(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (!_button.enabled) { print("Not enough education"); }
|
||||
|
||||
Reference in New Issue
Block a user