Ejemplo n.º 1
0
 public void change_2_SUPPLY_PROCESS(SupplyType supplyType)
 {
     if (_status != 0 && _status != ScreenStatus.RIGHT_PAIN_WORK)
     {
         return;
     }
     _status = ScreenStatus.SUPPLY_PROCESS;
     _otherListParent.LockControl();
     _commonDeckSwitchManager.keyControlEnable = false;
     if (supplyType == SupplyType.All)
     {
         ShipModel model;
         if (isNotOther() && _currentDeck.GetShipCount() == getSelectedShipList().Count)
         {
             int mstId = _currentDeck.GetFlagShip().MstId;
             model = _currentDeck.GetFlagShip();
         }
         else
         {
             List <ShipModel> selectedShipList = getSelectedShipList();
             int index  = UnityEngine.Random.Range(0, selectedShipList.Count);
             int mstId2 = selectedShipList[index].MstId;
             model = selectedShipList[index];
         }
         ShipUtils.PlayShipVoice(model, 27);
     }
     SetShipSelectFocus(focused: false);
     _rightPane.LostFocus();
     _rightPane.SetEnabled(enabled: false);
     _rightPane.DoWindowOpenAnimation(supplyType);
     Supply(supplyType);
 }
Ejemplo n.º 2
0
 public bool IsDeckSelectable(int index, DeckModel deck)
 {
     if (deck == null)
     {
         return(_otherListParent.GetShipCount() > 0);
     }
     return(deck.GetShipCount() > 0);
 }
Ejemplo n.º 3
0
 public bool IsDeckSelectable(int index, DeckModel deck)
 {
     if (deck == null)
     {
         return(mRemodelManager.GetOtherShipList().Length > 0);
     }
     return(deck.GetShipCount() > 0);
 }
Ejemplo n.º 4
0
        public void Next()
        {
            int shipCount = mDeckModel.GetShipCount();

            if (mIndex + 1 < shipCount)
            {
                mIndex++;
                mUIRemodelShipSliderThumb_Thumb.transform.localPositionY(-mCellHeight * mIndex);
                ChangeShip();
            }
        }
Ejemplo n.º 5
0
 private void InitializeBanners(DeckModel deckModel, UIPracticeBattleConfirmShipSlot[] banners)
 {
     for (int i = 0; i < banners.Length; i++)
     {
         if (i < deckModel.GetShipCount())
         {
             banners[i].Initialize(i + 1, deckModel.GetShip(i));
         }
         else
         {
             banners[i].InitializeDefault();
         }
     }
 }
Ejemplo n.º 6
0
        public static HashSet <BattleFormationKinds1> GetSelectableFormations(DeckModel deck)
        {
            HashSet <BattleFormationKinds1> hashSet = new HashSet <BattleFormationKinds1>();

            if (deck != null)
            {
                int shipCount = deck.GetShipCount();
                hashSet.Add(BattleFormationKinds1.TanJuu);
                if (shipCount >= 4)
                {
                    hashSet.Add(BattleFormationKinds1.FukuJuu);
                    hashSet.Add(BattleFormationKinds1.Teikei);
                    hashSet.Add(BattleFormationKinds1.TanOu);
                    if (shipCount >= 5)
                    {
                        hashSet.Add(BattleFormationKinds1.Rinkei);
                    }
                }
            }
            return(hashSet);
        }