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