public void OnLevelItemTriggerEnter(Collider2D otherColliderInCollision, LevelItemTrigger itemInCollision) { if (otherColliderInCollision.name == "Character" && itemInCollision.name == "Bomb" && triggered == false) { //Debug.Log("triggered"); Timer(); } //could make array of all items that have entered and not exited the trigger zone using LevelItemTrigger script }
public void OnLevelItemTriggerEnter(Collider2D otherColliderInCollision, LevelItemTrigger itemInCollision) { counter++; Destroy(itemInCollision.gameObject); }