Ejemplo n.º 1
0
 private void UpdateInputGroupSelect()
 {
     if (Controls.AcceptTyped())
     {
         Game_Group group = _player.Deck.Groups[_menuGroups.Index].Clone();
         if (group.IsEmpty()) Resource.PlaySound("buzzer");
         else
         {
             _menuBattleGroup = new UI_BattleGroup(group, FIELD_X, FIELD_Y);
             _menuGroups.Active = false;
             Resource.PlaySound("decision");
         }
     }
     else if (Controls.CancelTyped())
     {
         _menuMain = new UI_TextMenu(new string[] { "Return to Game", "Return to Level Select" }, 280, 250, 240, 100, 0, new Bitmap("window_battlemenu.png"));
         _menuGroups.Active = false;
         Resource.PlaySound("decision");
     }
     _menuGroups.UpdateInput();
 }
Ejemplo n.º 2
0
 private void UpdatePostBattle()
 {
     _menuGroups.Active = false;
     _menuBattleGroup = null;
     if (_tickPostBattle < 30) _field.Update();
     if (_tickPostBattle == 30)
     {
         if (_field.HasPlayerWon())
             Resource.PlayMusic("victory", true);
         else if (_field.HasEnemyWon())
             Resource.PlayMusic("defeat", true);
     }
     _tickPostBattle++;
 }
Ejemplo n.º 3
0
 private void UpdateInputGroupPlacement()
 {
     _menuBattleGroup.UpdateInput();
     if (Controls.AcceptTyped())
     {
         if (_player.CanSendGroup(_menuBattleGroup.Group, _menuBattleGroup.Index))
         {
             _player.SendGroup(_menuBattleGroup.Group, _menuBattleGroup.Index);
             _menuBattleGroup = null;
             _menuGroups.Active = true;
             Resource.PlaySound("decision");
         }
         else
         {
             _flashReinforcements = 30;
             Resource.PlaySound("buzzer");
         }
     }
     else if (Controls.CancelTyped())
     {
         _menuBattleGroup = null;
         _menuGroups.Active = true;
         Resource.PlaySound("cancel");
     }
 }