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; } }
public void Setup() { _chr = new MeleeCharacter(); _things = new Tree(); }