示例#1
0
        public override void Update(GameTime gameTime)
        {
            if (InputManager.Instance.KeyPressed(Keys.Escape) && !gameEnded)
            {
                paused = true;

                /*graphicsDevice.SetRenderTarget(renderTarget);
                 * graphicsDevice.DepthStencilState = new DepthStencilState() { DepthBufferEnable = true };
                 *
                 * graphicsDevice.Present();
                 * graphicsDevice.SetRenderTarget(null);
                 * GameStateManager.Instance.AddScreen(new PauseScreen(graphicsDevice, game));*/
            }
            backgroundImage.Update(gameTime);
            if (!gameEnded)
            {
                tileManager.Update(gameTime);
            }
            else
            {
                scoreText.Update(gameTime);
                foreach (Text2D text in afterGameTexts)
                {
                    text.Update(gameTime);
                }
                if (InputManager.Instance.KeyPressed(Keys.Enter))
                {
                    GameStateManager.Instance.ChangeScreen(new TitleScreen(graphicsDevice, game));
                }
            }
        }
示例#2
0
 public override void Update(GameTime gameTime)
 {
     if (InputManager.Instance.KeyPressed(Keys.Escape))
     {
         GameStateManager.Instance.RemoveScreen();
     }
     backgroundImage.Update(gameTime);
     creditsText.Update(gameTime);
     highscoresText.Update(gameTime);
 }
示例#3
0
 public override void Update(GameTime gameTime)
 {
     backgroundImage.Update(gameTime);
     creditsText.Update(gameTime);
     menuManager.Update(gameTime);
 }
示例#4
0
 public void Update(GameTime gameTime)
 {
     tileSprite.Update(gameTime);
     diskSprite.Update(gameTime);
 }