public void SetTarget(UnitModel target) { _target = target; }
public LaserBulletModel(string visual, Vector2 position, UnitModel target, float speed) : base(visual, position, target, speed) { Position = position; }
protected virtual void _bullet_Hitted(BulletModel bullet, UnitModel unit) { unit.Health -= _damage; }
public virtual void ClearTarget() { _target = null; }
public RocketModel(string visual, Vector2 position, UnitModel target, float speed) : base(visual, position, target, speed) { _startDistance = Position.DistanceTo(_target.Position); _time = Mathf.Sqrt(2 * _startDistance / speed); }