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