示例#1
0
        public override void Update(GameTime gameTime)
        {
            if (gameTime.IsRunningSlowly)
            {
                return;
            }

            if (KeyboardHelper.KeyReleased(Microsoft.Xna.Framework.Input.Keys.Escape))
            {
                RemoveScreen(this);
                Content.Unload();
            }

            //Both side are animated at the same time and are expected to have the same lenght.
            ActiveUnitAnimation.Update(gameTime);
            EnemyUnitAnimation.Update(gameTime);

            if (ActiveUnitAnimation.HasEnded)
            {
                EndBattle();
            }
        }