Example #1
0
 public void DealDamage(IPropsTarget target, uint damagesAmount)
 {
     if (MathUtilility.GetDistance(WorldPosition, target.WorldPosition) > _maxRange)
     {
         return;
     }
     if (IsDamagesExceedOtherHealth(damagesAmount, target.Health))
     {
         target.Health = 0;
         target.State  = PropsTargetState.Destroyed;
     }
     else
     {
         target.Health -= damagesAmount;
     }
 }
Example #2
0
 public void Setup()
 {
     _chr    = new MeleeCharacter();
     _things = new Tree();
 }