private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "LargePlant") { PlantFlavorInput input = collision.gameObject.GetComponent <PlantFlavorInput>(); input.isFed = true; input.OpenPlant(); } }
private void OnTriggerExit2D(Collider2D collision) { if (collision.gameObject.tag == "Player" && !plantManager.isFed) { if (plantManager != null) { plantManager.OpenPlant(); } } }