Esempio n. 1
0
 /// <summary>
 /// Called when an objects takes damage, if the object taking damage is this tank
 /// deal damage to it, else ignore it.
 /// </summary>
 /// <param name="TankTransform"></param>
 /// <param name="AmountOfDamage"></param>
 private void TankTakenDamage(Transform TankTransform, float AmountOfDamage)
 {
     Debug.Log("Damage Taken");
     // if the Tank transform coming in, isn't this particular tank, ignore it.
     if (TankTransform != transform)
     {
         Debug.Log("Not the right transform");
         return;
     }
     else
     {
         Debug.Log("Damage applied?" + AmountOfDamage);
         tankHealth.ApplyHealthChange(AmountOfDamage);
     }
 }