private bool _updateChkNextCell(object data) { if (!_clsMapManager.IsNextFinal()) { if (BattleTaskManager.GetRootType() == Generics.BattleRootType.Rebellion && BattleTaskManager.GetBattleManager().ChangeableDeck&& BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverYouin() && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverMegami()) { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal); return(true); } if (BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !ShipUtils.HasRepair(_clsResultModel.Ships_f[0])) { BattleTaskManager.ReqPhase(BattlePhase.FlagshipWreck); return(true); } BattleTaskManager.ReqPhase(BattlePhase.EscortShipEvacuation); return(true); } if (SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { RetentionData.SetData(BattleUtils.GetRetentionDataMapOpen(SortieBattleTaskManager.GetMapManager(), _clsResultModel)); SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } return(true); }
private bool _initThalassocracyProd(object data) { Observable.FromCoroutine((IObserver <bool> observer) => CreateThalassocracy(observer)).Subscribe(delegate { _prodThalassocracy.Play(_onThalassocracyProdFinished, BattleTaskManager.GetRootType(), BattleTaskManager.GetBattleManager().AreaName); }); return(false); }
protected override bool Init() { _clsResultModel = BattleTaskManager.GetBattleManager().GetBattleResult(); _clsMapManager = SortieBattleTaskManager.GetMapManager(); _clsInput = BattleTaskManager.GetKeyControl(); _clsState = new StatementMachine(); if (BattleTaskManager.GetRootType() == Generics.BattleRootType.Rebellion) { if (_clsMapManager.IsNextFinal()) { if (_clsResultModel.WinRank == BattleWinRankKinds.B || _clsResultModel.WinRank == BattleWinRankKinds.A || _clsResultModel.WinRank == BattleWinRankKinds.S) { _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd); } else { _clsState.AddState(_initChkNextCell, _updateChkNextCell); } } else { _clsState.AddState(_initChkNextCell, _updateChkNextCell); } } 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(_initMapOpenProd, _updateMapOpenProd); } else if (_clsResultModel.SPoint > 0) { _clsState.AddState(_initStrategyPointProd, _updateStrategyPointProd); } else if (_clsResultModel.GetAreaRewardItems() != null) { _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet); } else { _clsState.AddState(_initChkNextCell, _updateChkNextCell); } return(true); }
protected override bool Init() { if (BattleTaskManager.GetBattleManager().IsPractice) { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { SingletonMonoBehaviour <AppInformation> .Instance.NextLoadType = AppInformation.LoadType.Ship; SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; base.ImmediateTermination(); Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } else { BattleTaskManager.GetPrefabFile().battleShutter.ReqMode(BaseShutter.ShutterMode.Close, delegate { Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera; cutInEffectCamera.blur.set_enabled(false); this._prodAdvancingWithDrawalSelect = ProdAdvancingWithDrawalSelect.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdAdvancingWithDrawalSelect.GetComponent <ProdAdvancingWithDrawalSelect>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), BattleTaskManager.GetRootType()); this._prodAdvancingWithDrawalSelect.Play(new DelDecideHexButtonEx(this.DecideAdvancinsWithDrawalBtn)); }); }); } return(true); }
protected override bool Init() { BattleTaskManager.GetPrefabFile().battleShutter.Init(BaseShutter.ShutterMode.Close); if (BattleTaskManager.GetBattleManager().IsPractice) { _async = Application.LoadLevelAsync(Generics.Scene.Strategy.ToString()); _async.allowSceneActivation = true; } else { _prodAdvancingWithDrawalDC = ProdAdvancingWithDrawalDC.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdAdvancingWithDrawalDC).GetComponent <ProdAdvancingWithDrawalDC>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, BattleTaskManager.GetRootType()); _prodAdvancingWithDrawalDC.Play(DecideAdvancinsWithDrawalBtn); } return(true); }