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