Exemplo n.º 1
0
 private void Damage(GameObject other)
 {
     if (other.tag == targetTag)
     {
         IDamagable damagable = other.GetComponent <IDamagable>();
         if (damagable != null)
         {
             damagable.GetHit(this.damage);
         }
     }
 }