示例#1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     game.GraphicsDevice.Clear(Color.Black);
     spriteBatch.Begin(SpriteSortMode.Deferred,
                       null,
                       SamplerState.LinearWrap,
                       null, null, null,
                       game.camera.GetViewMatrix(Vector2.Zero));
     spriteBatch.DrawString(font, "GAME OVER", new Vector2(40, 225), Color.White);
     spriteBatch.DrawString(font, "Press R to restart", new Vector2(40, 300), Color.White);
     spriteBatch.DrawString(font, "Press Q to Quit", new Vector2(40, 400), Color.White);
     spriteBatch.End();
     feed.Draw(spriteBatch, game.camera);
 }
示例#2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     game.GraphicsDevice.Clear(Color.Black);
     spriteBatch.Begin(SpriteSortMode.BackToFront,
                       null,
                       SamplerState.LinearWrap,
                       null, null, null,
                       game.camera.GetViewMatrix(Vector2.One));
     spriteBatch.DrawString(font, "YOU WIN", new Vector2(game.Level0.Mario.SpritePosition.X - 200, 225), Color.White);
     spriteBatch.DrawString(font, "Press R to restart", new Vector2(game.Level0.Mario.SpritePosition.X - 200, 300), Color.White);
     spriteBatch.DrawString(font, "Press Q to Quit", new Vector2(game.Level0.Mario.SpritePosition.X - 200, 400), Color.White);
     spriteBatch.End();
     feed.Draw(spriteBatch, game.camera);
 }