Пример #1
0
 private void UpdateInputMenu()
 {
     _menu.UpdateInput();
     if (Controls.AcceptTyped())
     {
         Resource.PlaySound("decision");
         switch (_menu.Index)
         {
             case 0: // new game
                 {
                     _menuConfirm = new UI_Confirm(new string[] { "Are you sure you want to start a new", "game? (any saved data will be lost)" });
                     _menu.Active = false;
                     break;
                 }
             case 1: // continue
                 {
                     this.Dispose();
                     Global.Player = Saving.LoadPlayerData();
                     GameMain.Scene = new Scene_Menu();
                     break;
                 }
         }
     }
 }
Пример #2
0
 private void UpdateInputMenuMain()
 {
     _menuMain.UpdateInput();
     if (Controls.AcceptTyped() && _menuMain.Index == 1)
     {
         Resource.PlaySound("decision");
         _menuConfirm = new UI_Confirm(new string[] { "Are you sure you want to leave the", "battle?" });
         _menuMain.Active = false;
     }
     else if (Controls.CancelTyped() || (Controls.AcceptTyped() && _menuMain.Index == 0))
     {
         Resource.PlaySound("cancel");
         _menuMain.Dispose();
         _menuMain = null;
         _menuGroups.Active = true;
     }
 }
Пример #3
0
 private void UpdateInputMenuConfirm()
 {
     _menuConfirm.UpdateInput();
     if (Controls.AcceptTyped() && _menuConfirm.Index == 0)
     {
         Resource.PlaySound("decision");
         this.Dispose();
         Saving.CreateNewSave();
         Global.Player = Saving.LoadPlayerData();
         GameMain.Scene = new Scene_Menu();
     }
     else if (Controls.CancelTyped() || (Controls.AcceptTyped() && _menuConfirm.Index == 1))
     {
         Resource.PlaySound("cancel");
         _menuConfirm.Dispose();
         _menuConfirm = null;
         _menu.Active = true;
     }
 }
Пример #4
0
 private void UpdateInputMenuConfirm()
 {
     _menuConfirm.UpdateInput();
     if (Controls.AcceptTyped() && _menuConfirm.Index == 0)
     {
         Resource.PlaySound("decision");
         this.Dispose();
         GameMain.Scene = new Scene_LevelSelect(_level - 1);
     }
     else if (Controls.CancelTyped() || (Controls.AcceptTyped() && _menuConfirm.Index == 1))
     {
         Resource.PlaySound("cancel");
         _menuConfirm.Dispose();
         _menuConfirm = null;
         _menuMain.Active = true;
     }
 }