Beyond_Beyaan.GameMain.ProcessGame C# (CSharp) Метод

ProcessGame() публичный Метод

public ProcessGame ( float frameDeltaTime ) : void
frameDeltaTime float
Результат void
        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);
        }

Usage Example

Пример #1
0
        void Gorgon_Idle(object sender, FrameEventArgs e)
        {
            try
            {
                Gorgon.Screen.Clear(Drawing.Color.Black);
                Gorgon.Screen.BeginDrawing();

                gameMain.ProcessGame(e.FrameDeltaTime);

                Gorgon.Screen.EndDrawing();
            }
            catch (Exception exception)
            {
                HandleException(exception);
            }
        }