Beispiel #1
0
 public void CreateDifficultyMenu(Object data = null)
 {
     Menu dm = new Menu();
     dm.setButtons(new List<AButton>()
         {
             new TextButton(dm, "Easy", new Vector2(0,0), MenuManager.Instance.setMode, SettingsManager.EMode.EASY),
             new TextButton(dm, "Narmol", new Vector2(0, 1 * 100), MenuManager.Instance.setMode, SettingsManager.EMode.MEDIUM),
             new TextButton(dm, "Hard", new Vector2(0, 2 * 100), MenuManager.Instance.setMode, SettingsManager.EMode.HARD),
             new TextButton(dm, "Pro", new Vector2(0, 3 * 100), MenuManager.Instance.setMode, SettingsManager.EMode.PRO)
         });
     dm.Select((int)SettingsManager.Instance.Mode);
     dm.Center();
     menus.Push(dm);
 }
Beispiel #2
0
 public void CreateMainMenu()
 {
     Menu main = new Menu(AMenu.MenuType.MAIN_MENU);
     main.setButtons(new List<AButton>()
         {
             new TextButton(main, "Solo", new Vector2(0, 4 * 100 + 50), MenuManager.Instance.runScene, SceneManager.EScene.SOLO),
             new TextButton(main, "Multi", new Vector2(0, 5 * 100 + 50), MenuManager.Instance.runScene, SceneManager.EScene.MULTI),
             new TextButton(main, "Options", new Vector2(0, 6 * 100 + 50), MenuManager.Instance.launchMenu, EMenu.OPTIONS),
             new TextButton(main, "Tutorial", new Vector2(0, 7 * 100 + 50), MenuManager.Instance.changeMode),
             new TextButton(main, "Quit", new Vector2(0, 8 * 100 + 50), MenuManager.Instance.Quit)
         });
     main.Center();
     menus.Push(main);
 }
Beispiel #3
0
 public void CreatePauseMenu(AScene target)
 {
     Menu pause = new Menu();
     pause.setButtons(new List<AButton>()
         {
             new TextButton(pause, "Resume", new Vector2(0, 0), MenuManager.Instance.ResumeGame, target),
             new TextButton(pause, "Options", new Vector2(0, 1 * 100), MenuManager.Instance.launchMenu, EMenu.OPTIONS),
             new TextButton(pause, "Give Up", new Vector2(0, 2 *100), MenuManager.Instance.launchMenu, EMenu.MAIN)
         });
     pause.Center();
     menus.Push(pause);
     SoundManager.Instance.play(SoundManager.EChannel.BGM, SoundManager.ESound.OPTBGM, 0, 0.5f, true);
 }
Beispiel #4
0
 public void CreateSoundMenu(Object data = null)
 {
     Menu sound = new Menu();
     sound.setButtons(new List<AButton>()
         {
             new ToggleButton(sound, "Music", new Vector2(0,0), SettingsManager.Instance.setMusic,  SettingsManager.Instance.Music),
             new ToggleButton(sound, "Sound Fx", new Vector2(0, 1 * 100), SettingsManager.Instance.setSfx, SettingsManager.Instance.Sfx),
             new TextButton(sound, "Back", new Vector2(0, 2 * 100), MenuManager.Instance.BackMenu)
         });
     sound.Center();
     menus.Push(sound);
 }
Beispiel #5
0
 public void CreateOptionMenu()
 {
     Menu option = new Menu();
     option.setButtons(new List<AButton>()
         {
             new TextButton(option, "Sound", new Vector2(0, 0), MenuManager.Instance.CreateSoundMenu),
             new TextButton(option, "Difficulty", new Vector2(0, 1 * 100), MenuManager.Instance.CreateDifficultyMenu),
             new TextButton(option, "Back", new Vector2(0, 2 * 100), MenuManager.Instance.SaveSetting),
         });
     option.Center();
     menus.Push(option);
 }