Example #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);
     }
 }
Example #2
0
 public void OnCollisionEnter(Collision collision)
 {
     ShipState.OnHit(10);
 }