Beispiel #1
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     graphicsDevice.Clear(Color.Black);
     spriteBatch.Begin();
     splashImage.Draw(spriteBatch);
     spriteBatch.End();
 }
Beispiel #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));
     }
 }
Beispiel #3
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     graphicsDevice.Clear(Color.Black);
     spriteBatch.Begin();
     backgroundImage.Draw(spriteBatch);
     menuManager.Draw(spriteBatch);
     spriteBatch.End();
 }
Beispiel #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();
 }
Beispiel #5
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (!hideBackground)
     {
         tileSprite.Draw(spriteBatch);
     }
     if (Visible)
     {
         diskSprite.Draw(spriteBatch);
     }
 }