Beispiel #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.tag == "PlayerShot")
     {
         smallExplosion.playHitEffect(col.transform.localPosition);
         Destroy(col.gameObject);
         takeDamage(10);
     }
 }
Beispiel #2
0
 void OnTriggerEnter(Collider col)
 {
     if (this.gameObject.name != "Mine" && this.gameObject.name != "Mine(Clone)" && this.gameObject.name != "sFlare" && this.gameObject.name != "sFlare(Clone)")
     {
         if (col.gameObject.tag == "PlayerShot")
         {
             Destroy(col.gameObject);
             sAnimation.playHitEffect();
             takeDamage(Player.damage);
         }
     }
 }