コード例 #1
0
ファイル: SpellswordGame.cs プロジェクト: Exmintor/Spellsword
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            spriteBatch.Begin();
            switch (CurrentState)
            {
            case GameState.World:
                walkingScene.Draw(spriteBatch);
                break;

            case GameState.Paused:
                walkingScene.Draw(spriteBatch);
                spriteBatch.DrawString(Content.Load <SpriteFont>("Arial"), "Paused", new Vector2(150, 150), Color.Red);
                break;

            case GameState.Battle:
                GraphicsDevice.Clear(Color.Red);
                battleScene.Draw(spriteBatch);
                break;

            case GameState.MainMenu:
                walkingScene.Draw(spriteBatch);
                menuScene.Draw(spriteBatch);
                break;

            case GameState.WinState:
                walkingScene.Draw(spriteBatch);
                spriteBatch.DrawString(Content.Load <SpriteFont>("Arial"), "    YOU WIN!\nPress 'R' to Reset", new Vector2(150, 150), Color.Red);
                break;
            }
            spriteBatch.End();
            base.Draw(gameTime);
        }