Example #1
0
        public override void Update()
        {
            PathFollower.FollowPath(Speed * MoverDeltaTime);
            float angle = LookAt(PathFollower.CurrentWaypoint);

            Rotate(angle, Width / 2, Height / 2);
            CheckStatChange();
            if (animatingDamage)
            {
                AnimateDamage();
            }
            if (PathFollower.PathEnded)
            {
                Destroy();
                Game.PlayerTank.HitPoints -= 1;
            }
        }
Example #2
0
 public Enemy(GameController game) : base(game)
 {
     PathFollower = new PathFollower(game, this);
 }