コード例 #1
0
        private IEnumerator ChkUnderwayReplenishment(MapManager manager)
        {
            if (manager.GetMapSupplyInfo() != null)
            {
                ProdUnderwayReplenishment pur = ProdUnderwayReplenishment.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabProdUnderwayReplenishment).GetComponent <ProdUnderwayReplenishment>(), SortieMapTaskManager.GetSharedPlace(), manager.GetMapSupplyInfo());
                yield return(pur.Play().StartAsCoroutine());

                Mem.DelComponentSafe(ref pur);
                yield break;
            }
            MapManager            mm    = SortieBattleTaskManager.GetMapManager();
            UISortieShipCharacter uissc = SortieMapTaskManager.GetUIShipCharacter();

            if (uissc.isInDisplay)
            {
                uissc.SetShipData(mm.Deck.GetFlagShip());
                uissc.Show(null);
                yield return(Observable.Timer(TimeSpan.FromSeconds(2.0)).StartAsCoroutine());
            }
        }
コード例 #2
0
        protected override bool Init()
        {
            App.TimeScale(1f);
            UIShortCutSwitch shortCutSwitch = SortieMapTaskManager.GetShortCutSwitch();

            shortCutSwitch.Hide();
            SortieMapTaskManager.GetUIShipCharacter().ShowInFormation(50, null);
            BattleFormationKinds1[] formationArray = SortieUtils.GetFormationArray(SortieBattleTaskManager.GetMapManager().Deck);
            if (1 < formationArray.Length)
            {
                _uiBattleFormationSelector = Util.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabUIBattleFormationKindSelectManager.gameObject, SortieMapTaskManager.GetSharedPlace().gameObject).GetComponent <UIBattleFormationKindSelectManager>();
                SortieMapTaskManager.GetUIAreaMapFrame().SetMessage("陣形を選択してください。");
                _uiBattleFormationSelector.Initialize(GameObject.Find("SortieAreaCamera").GetComponent <Camera>(), formationArray);
                _uiBattleFormationSelector.SetOnUIBattleFormationKindSelectManagerAction(UIBattleFormationKindSelectManagerActionCallBack);
                _uiBattleFormationSelector.SetKeyController(SortieBattleTaskManager.GetKeyControl());
            }
            else
            {
                OnFormationSelected(BattleFormationKinds1.TanJuu);
            }
            return(true);
        }
コード例 #3
0
 private IEnumerator ChkCompass(MapManager manager, UIMapManager uiManager, UISortieShip ship)
 {
     if (manager.hasCompass())
     {
         SortieMapTaskManager.GetUIAreaMapFrame().SetMessage("どこに進む?");
         UICompassManager uicm   = UICompassManager.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabUICompassManager).GetComponent <UICompassManager>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().CompassId, ship.transform, uiManager.nextCell.transform);
         bool             isWait = false;
         uicm.Play(delegate
         {
             isWait = true;
         });
         while (!isWait)
         {
             yield return(new WaitForEndOfFrame());
         }
         Mem.DelComponentSafe(ref uicm);
     }
 }
コード例 #4
0
        protected override bool Init()
        {
            this._clsState = new StatementMachine();
            UIAreaMapFrame uIAreaMapFrame = SortieMapTaskManager.GetUIAreaMapFrame();

            uIAreaMapFrame.Hide().setOnComplete(delegate
            {
                this._uiBattleShutter = BattleShutter.Instantiate(SortieBattleTaskManager.GetSortieBattlePrefabFile().prefabUIBattleShutter.GetComponent <BattleShutter>(), SortieMapTaskManager.GetSharedPlace(), 20);
                this._uiBattleShutter.Init(BaseShutter.ShutterMode.Open);
                this._uiBattleShutter.ReqMode(BaseShutter.ShutterMode.Close, delegate
                {
                    ProdSortieEnd prodSortieEnd = ProdSortieEnd.Instantiate(SortieMapTaskManager.GetPrefabFile().prodSortieEnd.GetComponent <ProdSortieEnd>(), SortieMapTaskManager.GetSharedPlace());
                    prodSortieEnd.Play(delegate
                    {
                        this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitResult), new StatementMachine.StatementMachineUpdate(this.UpdateResult));
                    });
                });
            });
            return(true);
        }
コード例 #5
0
        private bool InitGetSPoint(object data)
        {
            MapManager mapManager = SortieBattleTaskManager.GetMapManager();

            if (mapManager.GetNewOpenMapIDs() != null && mapManager.GetSPoint() > 0)
            {
                this._prodStrategyPoint = ProdMapPoint.Instantiate(Resources.Load <ProdMapPoint>("Prefabs/Battle/Production/MapOpen/ProdMapOpenPoint"), SortieMapTaskManager.GetSharedPlace(), mapManager.GetSPoint());
                this._prodStrategyPoint.Play(new Action(this.OnFinished));
            }
            else
            {
                this.OnFinished();
            }
            return(false);
        }
コード例 #6
0
        private bool InitMapOpen(object data)
        {
            MapManager mapManager = SortieBattleTaskManager.GetMapManager();

            if (mapManager.GetNewOpenMapIDs() != null)
            {
                this._prodMapOpen = ProdMapOpen.Instantiate(PrefabFile.Load <ProdMapOpen>(PrefabFileInfos.MapOpen), mapManager.GetNewOpenAreaIDs(), mapManager.GetNewOpenMapIDs(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetKeyControl(), 120);
                this._prodMapOpen.Play(new Action(this.OnMapOpenFinished));
            }
            else
            {
                this.OnMapOpenFinished();
            }
            return(false);
        }
コード例 #7
0
 private bool InitResult(object data)
 {
     this._ctrlSortieResult = CtrlSortieResult.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabCtrlSortieResult.GetComponent <CtrlSortieResult>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().Items, delegate
     {
         this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitReward), new StatementMachine.StatementMachineUpdate(this.UpdateReward));
     });
     return(false);
 }
コード例 #8
0
 private bool InitResult(object data)
 {
     _ctrlSortieResult = CtrlSortieResult.Instantiate(((Component)SortieMapTaskManager.GetPrefabFile().prefabCtrlSortieResult).GetComponent <CtrlSortieResult>(), SortieMapTaskManager.GetSharedPlace(), SortieBattleTaskManager.GetMapManager().Items, delegate
     {
         _clsState.AddState(InitReward, UpdateReward);
     });
     return(false);
 }