Exemplo n.º 1
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.tag == HitBulletTag)
     {
         //	Debug.Log(other.name + " have touched : " + gameObject.name);
         ShipState.OnHit(other.GetComponent <Bullet>().GetDamage());
         Destroy(other.gameObject);
     }
 }
Exemplo n.º 2
0
 public void OnCollisionEnter(Collision collision)
 {
     ShipState.OnHit(10);
 }