Exemple #1
0
 public override void Update(GameTime gameTime)
 {
     if (Stage == 0)
     {
         if (InputHelper.InputCancelPressed())
         {
             RemoveScreen(this);
         }
         else if (InputHelper.InputConfirmPressed() && ListPresentUnit.Count > 0)
         {
             StatusMenu.ActiveSquad  = new Squad("", SelectedUnit);
             StatusMenu.StatusPannel = StatusMenuScreen.StatusPannels.Unit;
             Stage = 1;
         }
         else
         {
             UnitSelectionMenu.Update(gameTime);
         }
     }
     else if (Stage == 1)
     {
         if (InputHelper.InputCancelPressed())
         {
             Stage = 0;
         }
     }
 }
Exemple #2
0
        public override void Update(GameTime gameTime)
        {
            switch (Stage)
            {
            case 0:
                if (InputHelper.InputCancelPressed())
                {
                    RemoveScreen(this);
                }
                else if (InputHelper.InputConfirmPressed() && ListPresentUnit.Count > 0)
                {
                    Stage = 1;
                    EquipmentSelectionMenu = new DrawableMenu(DrawMenuEquipment, SelectedUnit.ArrayUnitStat.Length, 5);
                    ListTerrainChoices.AddRange(SelectedUnit.ListTerrainChoices);
                    GoToPartChange();
                }
                else
                {
                    UnitSelectionMenu.Update(gameTime);
                }
                break;

            case 1:
                if (InputHelper.InputConfirmPressed())
                {
                    GoToPartChange();
                    Stage = 0;
                }
                else
                {
                    EquipmentSelectionMenu.Update(gameTime);
                }

                if (InputHelper.InputUpPressed())
                {
                    SelectedUnit.ChangeUnit(EquipmentSelectionMenu.SelectedItemIndex);
                    UpdatePartsEffects();
                }
                else if (InputHelper.InputDownPressed())
                {
                    SelectedUnit.ChangeUnit(EquipmentSelectionMenu.SelectedItemIndex);
                    UpdatePartsEffects();
                }
                break;
            }
        }