Пример #1
0
 public override void GetDamage(float damage)
 {
     if (damage > 0)
     {
         DamageParicle.Play();
     }
     curHealth = (curHealth - damage <= 0) ? 0 : (curHealth - damage);
     if (curHealth == 0)
     {
         Destruction();
     }
 }
Пример #2
0
 public override void GetDamage(float damage)
 {
     if (damage > 0)
     {
         DamageParicle.Play();
     }
     curHealth = (curHealth - damage <= 0) ? 0 : (curHealth - damage);
     if (curHealth == 0)
     {
         StateChange(eUnitState.Dead);
     }
     Target.TargetUpdate();
 }