public static Menu MakeAchievementMenu(GameUpdater env) { Menu output = new Menu("Achievements"); output.drawPosition.X = 30; output.drawPosition.Y = 10; foreach (Achievements a in Enum.GetValues(typeof(Achievements))) output.addItem(new AchievementItem(a, env, smallFont)); output.addItem(new StartButton("Back to Main Menu", mediumFont)); return output; }
public override void Initialize() { base.Initialize(); batch = new SpriteBatch(GraphicsDevice); switch (type) { case MenuScreenType.Death: menu = Menu.MakeDeathMenu(); break; case MenuScreenType.Start: menu = Menu.MakeStartMenu(); break; case MenuScreenType.Win: menu = Menu.MakeWinMenu(); break; case MenuScreenType.Achievements: menu = Menu.MakeAchievementMenu(env); break; default: throw new NotImplementedException(); } }
public static Menu MakeDeathMenu() { Menu output = new Menu("You have died. Try to avoid that."); output.addItem(new StartButton("Back to Main Menu", mediumFont)); output.addItem(new ExitButton("Exit Game", mediumFont)); return output; }
public static Menu MakeWinMenu() { Menu output = new Menu("You win! You're the best winner ever."); output.addItem(new StartButton("Back to Main Menu", mediumFont)); output.addItem(new ExitButton("Exit Game", mediumFont)); return output; }
public static Menu MakeStartMenu() { Menu output = new Menu("FROG DEFENSE"); output.addItem(new NewGameButton("New Game", mediumFont)); output.addItem(new ResumeButton("Resume Game", mediumFont)); output.addItem(new GoToAchievementsItem("View Achievements", mediumFont)); output.addItem(new ExitButton("Exit Game", mediumFont)); return output; }