public void QuitToMenu() { TextScene confirm = new TextScene("Warning", "Are you sure you want to quit?"); confirm.AddChoice("Yes", delegate() { Program.SceneManager.SetBaseScene(new TitleScene()); }); confirm.AddChoice("No", delegate() { confirm.EndScene(); }); AddSubscene(confirm); }
public static void LoadGame() { TextScene loadscreen = new TextScene("Choose your player", "", new Dictionary <string, Action>()); List <Player> players = Player.GetAllPlayers(); foreach (Player p in players) { if (p.ID > 0) { loadscreen.AddChoice(p.Name + " (" + p.Level + ")", delegate() { LoadPlayer(p.ID); }); } } loadscreen.AddChoice("Cancel", delegate() { Program.SceneManager.EndSubscene(); }); Program.SceneManager.AddSubscene(loadscreen); }
private void ShowNPCDetails() { NPC npc = Opponents[ChoiceIndex]; Player player = Program.ActivePlayer; string text = npc.Name + "\n" + npc.Description + "\nYour record against " + npc.Name + ":\nWins: " + player.GetWins(npc.ID) + " Losses: " + player.GetLosses(npc.ID) + " Ties: " + player.GetTies(npc.ID); TextScene confirm = new TextScene(text); confirm.AddChoice("Battle", delegate() { AddSubscene(new Battle(player, npc)); }); confirm.AddChoice("Cancel", delegate() { EndSubscene(); }); AddSubscene(confirm); }