Exemplo n.º 1
0
        public static void Update(GameTime gameTime)
        {
            ElapsedSeconds = (float)gameTime.ElapsedGameTime.TotalSeconds * TimeScale;
            TotalSeconds   = (float)gameTime.TotalGameTime.TotalSeconds;


            GameConsole.Clear();

            _fpsCounter.Update(gameTime);

            Input.Update(gameTime);

            if (Audio != null)
            {
                Audio.Update();
            }

            Screen.Update();

            ScreenEffects.Instance.Update(gameTime);

            DebugRenderer.Update(gameTime);
        }
Exemplo n.º 2
0
        public static void Update(GameTime gameTime)
        {
            ElapsedSeconds = (float)gameTime.ElapsedGameTime.TotalSeconds * TimeScale;
            TotalSeconds   = (float)gameTime.TotalGameTime.TotalSeconds;

            GameConsole.Clear();
            _fpsCounter.Update(gameTime);
            Input.Update(gameTime);
            Audio?.Update();
            Screen.Update();
            ScreenEffects.Instance.Update(gameTime);
            DebugRenderer.Update(gameTime);

            if (GameEngine.Input.WasPressed(Keys.P))
            {
                TakeScreenshot();
                //MessageRenderer.Instance.PostMainMessage("destroy.pix", 50, 0.7f, 0.003f, 1.4f);
            }

            if (musicPlayer != null)
            {
                musicPlayer.Update();
            }
        }