Exemple #1
0
 public override void OnTriggerEnter2D(Collider2D coll)
 {
     if (String.Equals(coll.gameObject.tag, "Enemy"))
     {
         ShipInterface enem = coll.gameObject.GetComponent(typeof(ShipInterface)) as ShipInterface;
         if (enem.getShields() > 0)
         {
             this.OnDeath();
         }
         else
         {
             this.Infect(coll.gameObject, enem);
         }
     }
 }