private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "LargePlant") { PlantFlavorInput input = collision.gameObject.GetComponent <PlantFlavorInput>(); input.isFed = true; input.OpenPlant(); } }
// Start is called before the first frame update void Start() { plantManager = GetComponentInParent <PlantFlavorInput>(); }