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

public Update ( ) : void
Результат void
Пример #1
0
        internal void Update(GameTime gameTime)
        {
            if (IsMouseVisible != Game.IsMouseVisible)
            {
                Game.IsMouseVisible = IsMouseVisible;
            }

            Cursor.Current = ActualCursor;

            if (ToggleFullScreenRequested)
            {
                SynchronizeGraphicsDeviceManager();
                ToggleFullScreenRequested = false;
                Viewer.DefaultViewport    = GraphicsDevice.Viewport;
            }

            if (gameTime.TotalRealTime.TotalSeconds > 0.001)
            {
                Game.UpdaterProcess.WaitTillFinished();

                // Must be done in XNA Game thread.
                UserInput.Update(Game);

                // Swap frames and start the next update (non-threaded updater does the whole update).
                SwapFrames(ref CurrentFrame, ref NextFrame);
                Game.UpdaterProcess.StartUpdate(NextFrame, gameTime.TotalRealTime.TotalSeconds);
            }
        }
Пример #2
0
        void Update()
        {
            input.Update();
            UpdatePhysics();
            UpdateAnimation();

            ResetVariables();
        }
Пример #3
0
        protected override void Update(GameTime gameTime)
        {
            UserInput.Update(gameTime);
            Sounds.Update(gameTime);
            GameScreen newScreen = GameScreen.Current.Update(gameTime);

            if (newScreen != GameScreen.Current)
            {
                GameScreen.SwitchTo(newScreen);
            }
            base.Update(gameTime);
        }
Пример #4
0
        protected override void Update(GameTime gameTime)
        {
            GV.WindowFocused = this.IsActive;
            GV.GameTime      = gameTime;

            //Update Screens
            scrnMngr.Update();

            //Update Input
            UserInput.Update();

            base.Update(gameTime);
        }