예제 #1
0
        private bool UpdateUnitSelect(object data)
        {
            if (!this._isInputPossible)
            {
                return(false);
            }
            KeyControl keyControl = BattleCutManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.UP))
            {
                this._uiCommandUnitSelect.Prev();
            }
            else if (keyControl.GetDown(KeyControl.KeyName.DOWN))
            {
                this._uiCommandUnitSelect.Next();
            }
            else
            {
                if (keyControl.GetDown(KeyControl.KeyName.MARU))
                {
                    return(this._uiCommandUnitSelect.OnDecide());
                }
                if (keyControl.GetDown(KeyControl.KeyName.BATU))
                {
                    return(this._uiCommandUnitSelect.OnCancel());
                }
            }
            return(false);
        }
예제 #2
0
        private bool UpdateSurfaceSelect(object data)
        {
            if (!this._isInputPossible)
            {
                return(false);
            }
            KeyControl keyControl = BattleCutManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.UP))
            {
                this._uiCommandSurfaceList.Prev();
            }
            else if (keyControl.GetDown(KeyControl.KeyName.DOWN))
            {
                this._uiCommandSurfaceList.Next();
            }
            else if (keyControl.GetDown(KeyControl.KeyName.BATU))
            {
                this._uiCommandSurfaceList.RemoveUnit();
            }
            else if (keyControl.GetDown(KeyControl.KeyName.SHIKAKU))
            {
                this._uiCommandSurfaceList.RemoveUnitAll();
            }
            else if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                this._uiCommandSurfaceList.OnSelectSurface();
            }
            return(false);
        }
예제 #3
0
 public ProdBCWithdrawalDecision Play(Action <int> onFinished)
 {
     _actCallback = onFinished;
     Observable.FromCoroutine(PlayShowAnim).Subscribe(delegate
     {
         KeyControl keyControl = BattleCutManager.GetKeyControl();
         keyControl.IsRun      = true;
         ChangeFocus(_nIndex);
         _listLabelButton.ForEach(delegate(UILabelButton x)
         {
             x.toggle.enabled = true;
         });
         _isInputPossible = true;
     }).AddTo(base.gameObject);
     return(this);
 }
예제 #4
0
 public ProdBCWithdrawalDecision Play(Action <int> onFinished)
 {
     this._actCallback = onFinished;
     Observable.FromCoroutine(new Func <IEnumerator>(this.PlayShowAnim), false).Subscribe(delegate(Unit _)
     {
         KeyControl keyControl = BattleCutManager.GetKeyControl();
         keyControl.IsRun      = true;
         this.ChangeFocus(this._nIndex);
         this._listLabelButton.ForEach(delegate(UILabelButton x)
         {
             x.toggle.set_enabled(true);
         });
         this._isInputPossible = true;
     }).AddTo(base.get_gameObject());
     return(this);
 }
 public override bool Init(object data)
 {
     _clsResultModel = BattleCutManager.GetBattleManager().GetBattleResult();
     _clsMapManger   = BattleCutManager.GetMapManager();
     _clsInput       = BattleCutManager.GetKeyControl();
     _clsState       = new StatementMachine();
     if (BattleCutManager.GetBattleType() == Generics.BattleRootType.Rebellion)
     {
         if (_clsMapManger.IsNextFinal())
         {
             if (_clsResultModel.WinRank == BattleWinRankKinds.B || _clsResultModel.WinRank == BattleWinRankKinds.A || _clsResultModel.WinRank == BattleWinRankKinds.S)
             {
                 _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
             }
             else
             {
                 ChkNextCell();
             }
         }
         else
         {
             ChkNextCell();
         }
     }
     else if (_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
     }
     else if (!_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initMapClearProd, _updateMapClearProd);
     }
     else if (!_clsResultModel.FirstClear && _clsResultModel.NewOpenMapIDs.Length > 0)
     {
         _clsState.AddState(InitMapOpen, UpdateMapOpen);
     }
     else if (_clsResultModel.GetAreaRewardItems() != null)
     {
         _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet);
     }
     else
     {
         ChkNextCell();
     }
     return(false);
 }
예제 #6
0
 public void Run()
 {
     if (_isInputPossible)
     {
         KeyControl keyControl = BattleCutManager.GetKeyControl();
         if (keyControl.GetDown(KeyControl.KeyName.DOWN))
         {
             PreparaNext(isForward: true);
         }
         else if (keyControl.GetDown(KeyControl.KeyName.UP))
         {
             PreparaNext(isForward: false);
         }
         else if (keyControl.GetDown(KeyControl.KeyName.MARU))
         {
             DecideFormation(_iSelectFormation);
         }
     }
 }
예제 #7
0
 public bool Run()
 {
     if (!_isInputPossible)
     {
         return true;
     }
     KeyControl keyControl = BattleCutManager.GetKeyControl();
     if (keyControl.GetDown(KeyControl.KeyName.LEFT))
     {
         PreparaNext(isFoward: true);
     }
     else if (keyControl.GetDown(KeyControl.KeyName.RIGHT))
     {
         PreparaNext(isFoward: false);
     }
     else if (keyControl.GetDown(KeyControl.KeyName.MARU))
     {
         DecideAdvancingWithDrawal();
     }
     return true;
 }
예제 #8
0
        public void Run()
        {
            if (!this._isInputPossible)
            {
                return;
            }
            KeyControl keyControl = BattleCutManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.DOWN))
            {
                this.PreparaNext(true);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.UP))
            {
                this.PreparaNext(false);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                this.DecideFormation(this._iSelectFormation);
            }
        }
예제 #9
0
        public bool Run()
        {
            if (!this._isInputPossible)
            {
                return(true);
            }
            KeyControl keyControl = BattleCutManager.GetKeyControl();

            if (keyControl.GetDown(KeyControl.KeyName.LEFT))
            {
                this.PreparaNext(true);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.RIGHT))
            {
                this.PreparaNext(false);
            }
            else if (keyControl.GetDown(KeyControl.KeyName.MARU))
            {
                this.Decide();
            }
            return(true);
        }
예제 #10
0
        public bool Run()
        {
            KeyControl keyControl = BattleCutManager.GetKeyControl();

            if (_isInputPossible)
            {
                if (keyControl.GetDown(KeyControl.KeyName.LEFT))
                {
                    PreparaNext(isFoward: false);
                }
                else if (keyControl.GetDown(KeyControl.KeyName.RIGHT))
                {
                    PreparaNext(isFoward: true);
                }
                if (keyControl.GetDown(KeyControl.KeyName.MARU))
                {
                    OnDecide(_nIndex);
                    return(true);
                }
            }
            return(true);
        }
예제 #11
0
        public override bool Init(object data)
        {
            BattleManager battleManager = BattleCutManager.GetBattleManager();

            if (battleManager.GetEscapeCandidate() != null)
            {
                this._prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(this.prefabProdEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : this.prefabProdEscortShipEvacuation.GetComponent <ProdEscortShipEvacuation>(), BattleCutManager.GetSharedPlase(), BattleCutManager.GetKeyControl(), BattleCutManager.GetBattleManager().GetEscapeCandidate(), true);
                this._prodEscortShipEvacuation.Init();
                this._prodEscortShipEvacuation.Play(new DelDecideAdvancingWithdrawalButton(this.DecideAdvancinsWithDrawalBtn));
            }
            else if (battleManager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(battleManager.Ships_f[0]))
            {
                BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC);
            }
            else
            {
                BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal);
            }
            return(false);
        }
 private bool InitMapOpen(object data)
 {
     _prodMapOpen = ProdMapOpen.Instantiate(PrefabFile.Load <ProdMapOpen>(PrefabFileInfos.MapOpen), _clsResultModel, BattleCutManager.GetSharedPlase(), BattleCutManager.GetKeyControl(), BattleCutManager.GetMapManager(), 120);
     _prodMapOpen.Play(delegate
     {
         _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet);
     });
     return(false);
 }
 public override bool Init(object data)
 {
     SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
     _prodFlagshipWreck = ProdFlagshipWreck.Instantiate(((Component)BattleCutManager.GetPrefabFile().prefabProdFlagshipWreck).GetComponent <ProdFlagshipWreck>(), BattleCutManager.GetSharedPlase(), BattleCutManager.GetBattleManager().Ships_f[0], BattleCutManager.GetMapManager().Deck, BattleCutManager.GetKeyControl(), isBattleCut: true);
     _prodFlagshipWreck.Play(delegate
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive: true);
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume;
             SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume    = BattleDefines.SOUND_KEEP.BGMVolume;
             Mst_DataManager.Instance.PurgeUIBattleMaster();
             SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
             RetentionData.SetData(BattleUtils.GetRetentionDataFlagshipWreck(BattleCutManager.GetMapManager(), ShipRecoveryType.None));
             Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
         });
     });
     return(false);
 }
예제 #14
0
 private bool InitMapOpen(object data)
 {
     this._prodMapOpen = ProdMapOpen.Instantiate(PrefabFile.Load <ProdMapOpen>(PrefabFileInfos.MapOpen), this._clsResultModel, BattleCutManager.GetSharedPlase(), BattleCutManager.GetKeyControl(), BattleCutManager.GetMapManager(), 120);
     this._prodMapOpen.Play(delegate
     {
         this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitShortRewardGet), new StatementMachine.StatementMachineUpdate(this.UpdateShortRewardGet));
     });
     return(false);
 }
        private IEnumerator PlayReceiveShip()
        {
            _listRewardShips = new List <Reward_Ship>(_listRewardModels.Count);
            _listRewardShips.Add((Reward_Ship)_listRewardModels[0]);
            yield return(new WaitForSeconds(0.5f));

            _prodReceiveShip = ProdCutReceiveShip.Instantiate(PrefabFile.Load <ProdCutReceiveShip>(PrefabFileInfos.CommonProdCutReceiveShip), BattleCutManager.GetSharedPlase(), _listRewardShips[0], 120, BattleCutManager.GetKeyControl());
            yield return(new WaitForSeconds(0.1f));

            _prodReceiveShip.Play(delegate
            {
                BattleCutManager.ReqPhase(BattleCutPhase.MapOpen);
            });
        }