public void SetTarget(UnitModel target)
 {
     _target = target;
 }
 public LaserBulletModel(string visual, Vector2 position, UnitModel target, float speed) : base(visual, position, target, speed)
 {
     Position = position;
 }
Example #3
0
 protected virtual void _bullet_Hitted(BulletModel bullet, UnitModel unit)
 {
     unit.Health -= _damage;
 }
Example #4
0
 public virtual void ClearTarget()
 {
     _target = null;
 }
Example #5
0
 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);
 }