override protected void DrawKeyboardInstructions(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press ENTER to start", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.4f, Color.Red); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press SPACE for highscores", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.5f, Color.Red); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press O for options", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.6f, Color.Red); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press ESCAPE to exit", WindowManager.WindowHeight - WindowManager.WindowHeight / 2f, Color.Red); }
virtual protected void DrawUnchangingText(SpriteBatch aSpriteBatch, string aTitle) { string astring = GameBoard.PlaythroughTime.ToString(); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 2f, aTitle, WindowManager.WindowHeight - WindowManager.WindowHeight / 1.1f, Color.DeepPink); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Time spent: " + TimeSpan.FromMilliseconds(int.Parse(astring)).ToString(@"hh\:mm\:ss\.fff"), WindowManager.WindowHeight - WindowManager.WindowHeight / 1.15f, Color.White); }
private void DrawHighscores(SpriteBatch aSpriteBatch) { List <string> strings = Highscore.ReadToFile(); for (int i = 0; i < strings.Count; i++) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, strings[i], WindowManager.WindowHeight / 6.4f + (i * WindowManager.WindowHeight / 19.2f), Color.White); } }
private void DrawHighscores(SpriteBatch aSpriteBatch) { List <string> strings = Highscore.ReadFromFile(); for (int i = 0; i < strings.Count; i++) { strings[i] = TimeSpan.FromMilliseconds(int.Parse(strings[i])).ToString(@"hh\:mm\:ss\.fff"); } for (int i = 0; i < strings.Count; i++) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, strings[i], WindowManager.WindowHeight / 6.4f + (i * WindowManager.WindowHeight / 19.2f), Color.White); } }
private void DrawKeybindings(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "UP", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.5f, Color.Gold); OutlinedText.DrawCenteredText(aSpriteBatch, myFont, 1.5f, "LEFT", new Vector2(WindowManager.WindowWidth - WindowManager.WindowWidth / 1.8f, WindowManager.WindowHeight - WindowManager.WindowHeight / 1.65f), Color.Turquoise); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "DOWN", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.8f, Color.Lime); OutlinedText.DrawCenteredText(aSpriteBatch, myFont, 1.5f, "RIGHT", new Vector2(WindowManager.WindowWidth - WindowManager.WindowWidth / 2.3f, WindowManager.WindowHeight - WindowManager.WindowHeight / 1.65f), Color.DarkOrange); for (int i = 0; i < myTooltips.Count; i++) { switch (i) { case 0: case 1: myTooltips[i].Draw(aSpriteBatch, Color.Gold); break; case 2: case 3: myTooltips[i].Draw(aSpriteBatch, Color.Turquoise); break; case 4: case 5: myTooltips[i].Draw(aSpriteBatch, Color.Lime); break; case 6: case 7: myTooltips[i].Draw(aSpriteBatch, Color.DarkOrange); break; } } }
private void DrawScoreText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Score: " + Score, WindowManager.WindowHeight - WindowManager.WindowHeight / 16, Color.Yellow); }
private void DrawLivesText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Lives: " + Player.Lives, WindowManager.WindowHeight - WindowManager.WindowHeight / 12, Color.Yellow); }
override protected void DrawKeyboardInstructions(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press ENTER to restart", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.4f, Color.Red); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press ESCAPE to return to menu", WindowManager.WindowHeight - WindowManager.WindowHeight / 2f, Color.Red); }
override protected void DrawXboxControllerInstructions(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press A to restart", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.4f, Color.Yellow); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Press B to return to menu", WindowManager.WindowHeight - WindowManager.WindowHeight / 2f, Color.Yellow); }
override protected void DrawUnchangingText(SpriteBatch aSpriteBatch) { DrawUnchangingText(aSpriteBatch, "Game Over"); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Time spent won't be saved if you do not win", WindowManager.WindowHeight - WindowManager.WindowHeight / 3f, Color.PapayaWhip); }
override protected void DrawUnchangingText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 2f, "Pacman", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.1f, Color.DeepPink); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.2f, "by Andreas Gustafsson", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.15f); }
override protected void DrawUnchangingText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 2f, "Highscores (Speed run)", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.1f, Color.DeepPink); DrawHighscores(aSpriteBatch); }
override protected void DrawUnchangingText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 2f, "Game Over", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.1f, Color.DeepPink); OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 1.5f, "Score: " + GameBoard.Score, WindowManager.WindowHeight - WindowManager.WindowHeight / 1.15f, Color.White); }
override protected void DrawUnchangingText(SpriteBatch aSpriteBatch) { OutlinedText.DrawWidthCenteredText(aSpriteBatch, myFont, 2f, "Options", WindowManager.WindowHeight - WindowManager.WindowHeight / 1.1f, Color.DeepPink); DrawKeybindings(aSpriteBatch); }