public override void Update(uint time, int ticksPassed) { if (updateTimer.Update(time)) { UpdateTarget(time); } if (Target != null && CanSeeTarget(Target)) { if (!InFiringRange(Target)) { MoveTowardsTarget(); } else { Character.AimAt(Target.Location.ToPoint()); if (Character.Weapon.ReloadNeeded) { MoveToCover(); Character.Weapon.Reload(time); } else { if (fireTimer.Update(time)) { Character.Fire(time, Accuracy); } } } } Physics.Update(ticksPassed, Services.Game.Level); Physics.Impulse = Vector.Zero; Character.Update(time, ticksPassed); }
public void AimAt(Point point) { Character.AimAt(point); }