예제 #1
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == "MorphBall")
     {
         Destroy(other.gameObject);
         StartCoroutine(CollectAndPause());
         hasMorphBall = true;
     }
     else if (other.tag == "LongShot")
     {
         Destroy(other.gameObject);
         StartCoroutine(CollectAndPause());
         hasLongShot = true;
     }
     else if (other.tag == "TuckBall")
     {
         Destroy(other.gameObject);
         StartCoroutine(CollectAndPause());
         hasTuckBall = true;
     }
     else if (other.tag == "PowerBall")
     {
         Destroy(other.gameObject);
         StartCoroutine(CollectAndPause());
         hasPowerJump = true;
     }
     else if (other.tag == "Missle")
     {
         Destroy(other.gameObject);
         addMissles();
     }
     else if (other.tag == "Energy")
     {
         Destroy(other.gameObject);
         uh.AddHealthFromPickup();
     }
     else if (other.tag == "MisslePower")
     {
         Destroy(other.gameObject);
         StartCoroutine(CollectAndPause());
         Debug.Log("Found Missle PowerUp");
         hasMisslePower = true;
     }
 }