Ejemplo n.º 1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            switch (GameState.currentGameState)
            {
            case GameState.State.PlayerVsAI:
                world.Draw(gameTime);
                lableManager.Draw(gameTime);
                break;

            case GameState.State.AIVsAI:
                world.Draw(gameTime);
                lableManager.Draw(gameTime);
                break;

            case GameState.State.Video:
                world.Draw(gameTime);
                lableManager.Draw(gameTime);
                break;

            case GameState.State.Menu:
                startMenu.Draw(gameTime);
                break;

            case GameState.State.Exit:
                if (currentServer != null)
                {
                    currentServer.finalStop();
                }
                if (requestManager != null)
                {
                    requestManager.clearAll();
                }
                this.Exit();
                break;
            }

            base.Draw(gameTime);
            InputState.DrawMouse(spriteBatch);
        }