Exemple #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.WhiteSmoke);

            spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);

            switch (TileGrid.GameState)
            {
            case GameStates.Menu:
                menuManager.Draw(spriteBatch);
                bannerManager.Draw(spriteBatch, true);
                break;

            case GameStates.Lobby:
                menuManager.Draw(spriteBatch);
                networkingManager.Draw(spriteBatch);
                bannerManager.Draw(spriteBatch, true);
                break;

            case GameStates.QuitGame:
                menuManager.Draw(spriteBatch);
                tileManager.Draw(spriteBatch);
                TileGrid.Draw(spriteBatch);
                bannerManager.Draw(spriteBatch, false);
                animationManager.Draw(spriteBatch);
                break;

            case GameStates.Playing:
                tileManager.Draw(spriteBatch);
                TileGrid.Draw(spriteBatch);
                bannerManager.Draw(spriteBatch, false);
                animationManager.Draw(spriteBatch);
                break;
            }
            fpsMonitor.Draw(spriteBatch);

            spriteBatch.End();

            if (screenshotManager.NewShot)
            {
                screenshotManager.SaveScreenshot();
            }

            base.Draw(gameTime);
        }