Exemple #1
0
        public void ProcessGame(float frameDeltaTime)
        {
            bool skipUpdate    = false;
            bool handleTaskBar = false;

            if (_currentScreen != Screen.MainMenu && _currentScreen != Screen.NewGame && _currentScreen != Screen.Battle)
            {
                handleTaskBar = true;
            }
            if (handleTaskBar)
            {
                if (_situationReport.Update(MousePos.X, MousePos.Y, frameDeltaTime))
                {
                    skipUpdate = true;
                }
            }
            if (!skipUpdate)
            {
                _screenInterface.Update(MousePos.X, MousePos.Y, frameDeltaTime);
            }
            _screenInterface.DrawScreen();
            if (handleTaskBar)
            {
                _situationReport.DrawSitRep();
            }
            Cursor.Draw(MousePos.X, MousePos.Y);
            Cursor.Update(frameDeltaTime, Random);
        }
        protected override void Update(GameTime gameTime)
        {
            inputHelper.Update();
            if (actualScreen != null)
            {
                actualScreen.Update(gameTime, inputHelper);
            }

            base.Update(gameTime);
        }