Beispiel #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);
     }
 }
Beispiel #2
0
        private IEnumerator SupplyConfirmModeEnter()
        {
            if (SupplyMng.CheckBoxALLState != CheckBoxStatus.ON)
            {
                SupplyMng.ClickCheckBoxAll();
            }
            GameObject Instance = Util.Instantiate(Prefab_SupplyConfim, base.transform.parent.gameObject);

            supplyConfirm = Instance.GetComponent <StrategySupplyConfirm>();
            supplyConfirm.SetModel(SupplyMng);
            supplyConfirm.SetOnSelectPositive(OnDesideSupply);
            supplyConfirm.SetOnSelectNeagtive(OnCancelSupply);
            yield return(new WaitForEndOfFrame());

            supplyConfirm.Open();
        }