Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         player_Health playerFalls = other.gameObject.GetComponent <player_Health> ();
         playerFalls.makeDead();
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     nextDamage      = Time.time;
     thePlayer       = GameObject.FindGameObjectWithTag("Player");
     thePlayerHealth = thePlayer.GetComponent <player_Health> ();
 }