Ejemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         PlayerInfo playerInfo = other.GetComponent <PlayerInfo> ();
         playerInfo.AddLife();
         Destroy(gameObject);
     }
 }