Example #1
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.CompareTag("Damage"))
     {
         FallOut();
     }
     if (col.gameObject.CompareTag("Bell"))
     {
         TMPro.text = "You Win";
     }
     if (col.gameObject.CompareTag("Flower"))
     {
         TMPro.text = "Found a flower - keep exploring";
         gust.targets.Remove(col.gameObject);
         col.gameObject.GetComponent <Flower>().DestroyMe();
         gust.destination = null;
         gust.FindClosest();
         foundMessageTime = .01f;
     }
 }