public override void Draw(SpriteBatch spriteBatch)
 {
     graphics.Clear(Color.Black);
     spriteBatch.Begin();
     spriteBatch.DrawString(font, "You Won", new Vector2(300, 240), Color.White);
     spriteBatch.DrawString(font, "Press R to Reset", new Vector2(280, 280), Color.White);
     spriteBatch.DrawString(font, "Press Q to Quit", new Vector2(280, 320), Color.White);
     hud.Draw(spriteBatch);
     spriteBatch.End();
 }
示例#2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            graphics.Clear(Color.CornflowerBlue);

            foreach (Layer layer in layers)
            {
                layer.Draw(spriteBatch);
            }
            spriteBatch.Begin();
            hud.Draw(spriteBatch);
            spriteBatch.End();
        }
示例#3
0
 public override void Draw(SpriteBatch spriteBatch)
 {
     // dynamically changing string locations as follows.  graphics.viewport.height/width / 2 to find the center of the screen
     // the subtracting by an offset to shift text to the left in an attempt to center text on screen. (same for Y direction)
     // I am guessing on the offsets right now, can be tweeked for better a e s t h e t i c time permitting
     graphics.Clear(Color.Black);
     spriteBatch.Begin();
     hud.Draw(spriteBatch);
     spriteBatch.DrawString(font, "GAME PAUSED", new Vector2(CoC.X - 120, CoC.Y - 50), Color.White);
     spriteBatch.DrawString(font, "Press M for Main Menu", new Vector2(CoC.X - 160, CoC.Y + 50), Color.White);
     spriteBatch.DrawString(font, "Press Q to Quit", new Vector2(CoC.X - 120, CoC.Y + 80), Color.White);
     spriteBatch.End();
 }