Exemplo n.º 1
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     graphicsDevice.Clear(Color.Black);
     spriteBatch.Begin();
     splashImage.Draw(spriteBatch);
     spriteBatch.End();
 }
Exemplo n.º 2
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Begin();
     backgroundImage.Draw(spriteBatch);
     if (!gameEnded)
     {
         tileManager.Draw(spriteBatch);
     }
     else
     {
         foreach (Text2D text in afterGameTexts)
         {
             text.Draw(spriteBatch);
         }
         scoreText.Draw(spriteBatch);
     }
     spriteBatch.End();
     if (paused)
     {
         int[] backBuffer = new int[graphicsDevice.Viewport.Width * graphicsDevice.Viewport.Height];
         graphicsDevice.GetBackBufferData(backBuffer);
         Texture2D tempTexture = new Texture2D(graphicsDevice, graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height, false, graphicsDevice.PresentationParameters.BackBufferFormat);
         tempTexture.SetData(backBuffer);
         gaussianBlur.Input = tempTexture;
         gaussianBlur.Draw();
         graphicsDevice.GetBackBufferData(backBuffer);
         tempTexture = new Texture2D(graphicsDevice, graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height, false, graphicsDevice.PresentationParameters.BackBufferFormat);
         tempTexture.SetData(backBuffer);
         paused = false;
         GameStateManager.Instance.AddScreen(new PauseScreen(graphicsDevice, game, tempTexture));
     }
 }
Exemplo n.º 3
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     graphicsDevice.Clear(Color.Black);
     spriteBatch.Begin();
     backgroundImage.Draw(spriteBatch);
     menuManager.Draw(spriteBatch);
     spriteBatch.End();
 }
Exemplo n.º 4
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     graphicsDevice.Clear(Color.Black);
     spriteBatch.Begin();
     backgroundImage.Draw(spriteBatch);
     creditsText.Draw(spriteBatch);
     highscoresText.Draw(spriteBatch);
     // Draw sprites here
     spriteBatch.End();
 }
Exemplo n.º 5
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (!hideBackground)
     {
         tileSprite.Draw(spriteBatch);
     }
     if (Visible)
     {
         diskSprite.Draw(spriteBatch);
     }
 }