Ignore:
Timestamp:
2013-07-24 11:17:16 (8 years ago)
Author:
dezhidki
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Units/Unit.cs

    r4592 r4616  
    6666        { 
    6767            if (u.CanBeHurtBy(this)) 
    68                 u.OnDamage(this, damage, dir, pushPower); 
    69             if (u.Health <= 0) 
    70                 u.Remove(); 
     68                u.Damage(this, damage, dir, pushPower); 
    7169        } 
    7270 
    73         public virtual void OnDamage(Unit attacker, int damage, float dir, float pushPower) 
     71        public virtual void Damage(Unit attacker, int damage, float dir, float pushPower) 
    7472        { 
    7573            Health -= damage; 
     
    8179                HasHealth = false; 
    8280            } 
     81            if (Health <= 0) 
     82                Remove(); 
    8383        } 
    8484 
Note: See TracChangeset for help on using the changeset viewer.