NO LONGER CLICK THROUGH UI OMG

This commit is contained in:
dhain 2022-06-24 08:38:28 +02:00
parent d3a06effc5
commit 4a8067d3d7
7 changed files with 76 additions and 28 deletions

View file

@ -100,7 +100,7 @@ namespace Assets.Scripts.Actions {
bool rv = false;
try {
_animal = gameObject.GetComponent<Animal>();
rv = true;
rv = _animal != null;
}
catch { }
return rv;
@ -277,7 +277,8 @@ namespace Assets.Scripts.Actions {
public override bool Matches(GameObject gameObject, UsableItem usableItem) {
bool rv = base.Matches(gameObject, usableItem);
if(rv) {
rv = _animal.displayName.Equals("Cow") && usableItem.ID == ItemContainer.Instance.GetItemIdByName("Bucket");
rv = _animal.displayName.Equals("Cow") &&
usableItem.ID == ItemContainer.Instance.GetItemIdByName("Bucket");
}
return rv;
}