Fixed GameCursor with new fruit layout
This commit is contained in:
@@ -118,12 +118,9 @@ namespace Fruitomation.UI
|
|||||||
|
|
||||||
foreach (Collider2D col in Colliders)
|
foreach (Collider2D col in Colliders)
|
||||||
{
|
{
|
||||||
if (col.transform.name == "Sprite")
|
if (col.transform.parent.TryGetComponent(out ItemBehaviour item))
|
||||||
{
|
{
|
||||||
FruitBehaviour fruit = col.GetComponentInParent<FruitBehaviour>();
|
item.TriggerDestruction();
|
||||||
Debug.Assert(fruit, "Couldn't find FruitBehaviour");
|
|
||||||
|
|
||||||
fruit.TriggerDestruction();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user