public override void GetDamage(float damage) { if (damage > 0) { DamageParicle.Play(); } curHealth = (curHealth - damage <= 0) ? 0 : (curHealth - damage); if (curHealth == 0) { Destruction(); } }
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(); }