fix school dialog option

This commit is contained in:
Vova
2023-12-18 22:55:58 +02:00
parent d9b84788e1
commit 22149e24c8
5 changed files with 210 additions and 20 deletions
+6 -10
View File
@@ -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"); }