示例#1
0
 private void GotoSupplyConfirm()
 {
     if (!CheckDeckState())
     {
         return;
     }
     ShipModel[] ships = CurrentDeck.GetShips();
     for (int i = 0; i < ships.Length; i++)
     {
         if (ships[i].IsTettaiBling())
         {
             CommonPopupDialog.Instance.StartPopup("撤退中の艦を含んでいます");
             return;
         }
     }
     SupplyMng = new SupplyManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.AreaId);
     SupplyMng.InitForDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id);
     if (SupplyMng.CheckBoxALLState != CheckBoxStatus.ON)
     {
         SupplyMng.ClickCheckBoxAll();
     }
     if (SupplyMng.CheckedShipIndices.Length == 0)
     {
         CommonPopupDialog.Instance.StartPopup("補給対象の艦が居ません");
     }
     else if (!SupplyMng.IsValidSupply(SupplyType.All))
     {
         CommonPopupDialog.Instance.StartPopup("資源が不足しています");
     }
     else
     {
         ModeProcessor.ChangeMode(1);
     }
 }
 public void OnDeckChange(DeckModel deck)
 {
     _currentDeck = deck;
     if (_currentDeck != null && _currentDeck.IsActionEnd())
     {
         _mTrans_TurnEndStamp.SetActive(isActive: true);
         _mTrans_TurnEndStamp.DOKill();
         _mTrans_TurnEndStamp.DOLocalRotate(new Vector3(0f, 0f, 300f), 0f, RotateMode.FastBeyond360);
         _mTrans_TurnEndStamp.DOLocalRotate(new Vector3(0f, 0f, 360f), 0.8f, RotateMode.FastBeyond360).SetEase(Ease.OutBounce);
     }
     else
     {
         _mTrans_TurnEndStamp.SetActive(isActive: false);
     }
     if (isNotOther())
     {
         mShipSortButton.SetActive(isActive: false);
         SupplyManager.InitForDeck(_currentDeck.Id);
         _deckName.text = deck.Name;
         Transform transform     = _mTrans_TurnEndStamp.transform;
         Vector3   localPosition = _deckName.transform.localPosition;
         float     x             = localPosition.x;
         Vector2   printedSize   = _deckName.printedSize;
         transform.localPositionX(x + printedSize.x + 20f);
         _shipBannerContainer.Show(animation: true);
         _shipBannerContainer.InitDeck(deck);
         _otherListParent.Hide();
         SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck = _currentDeck;
     }
     else
     {
         mShipSortButton.SetActive(isActive: true);
         SupplyManager.InitForOther();
         _deckName.text = "その他";
         _shipBannerContainer.Hide(animation: true);
         _otherListParent.MemoryNextFocus();
         _otherListParent.Initialize(KeyController, SupplyManager.Ships);
         _otherListParent.Show();
         _otherListParent.StartState();
     }
     UpdateRightPain();
     if (_status == ScreenStatus.RIGHT_PAIN_WORK)
     {
         change_2_SHIP_SELECT(defaultFocus: true);
     }
 }