Exemple #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.DarkViolet);
            var color = new Color(255, 255, 133, 250);

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

            if (gameState.CurrentState == GameState.State.Playing)
            {
                drawer.DrawMap(gameMap, gameObjectTextures, true);
                drawer.DrawTextAtCenter(currentLevel.Label, spriteFont, color);
            }
            else if (gameState.CurrentState == GameState.State.Paused)
            {
                drawer.DrawMap(gameMap, gameObjectTextures, false);
                drawer.DrawMenu(mainMenu);
            }
            else if (gameState.CurrentState == GameState.State.LevelEnd)
            {
                drawer.DrawTextAtCenter("Your Scores: " + gameState.Scores, spriteFont, color);
            }

            spriteBatch.End();

            base.Draw(gameTime);
        }
Exemple #2
0
 private void ShowActions(Point destination)
 {
     _drawer.DrawMenu(destination.X, destination.Y, GetActions(destination));
 }