private void OnCommandBufferFinished2Withdrawal() { BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera; cutInCamera.eventMask = (Generics.Layers.UI2D | Generics.Layers.CutIn); BattleTaskManager.ReqPhase(BattlePhase.WithdrawalDecision); }
private void OnCommandBufferFinished() { BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera; cutInCamera.eventMask = (Generics.Layers.UI2D | Generics.Layers.CutIn); BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.Command)); }
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); }
protected override bool Init() { this._clsState = new StatementMachine(); this._clsBattleResult = BattleTaskManager.GetBattleManager().GetBattleResult(); this._listRewardModels = this._clsBattleResult.GetRewardItems(); if (this._listRewardModels.get_Count() > 0) { for (int i = 0; i < this._listRewardModels.get_Count(); i++) { if (this._listRewardModels.get_Item(i) is IReward_Ship) { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this._initShipGet), new StatementMachine.StatementMachineUpdate(this._updateShipGet)); } if (this._listRewardModels.get_Item(i) is IReward_Slotitem) { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this._initSlotItemGet), new StatementMachine.StatementMachineUpdate(this._updateSlotItemGet)); } if (this._listRewardModels.get_Item(i) is IReward_Useitem) { this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this._initUseItemGet), new StatementMachine.StatementMachineUpdate(this._updateUseItemGet)); } } } else { BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.ClearReward)); base.ImmediateTermination(); } return(true); }
private bool InitCommandBuffer(object data) { if (_nCurrentShellingCnt == _listCmdActionList.Count) { OnShellingPhaseFinished(); return(false); } _isFriendActionExit = false; _isEnemyActionExit = false; EffectModel effectModel = BattleTaskManager.GetBattleManager().GetEffectData(_nCurrentShellingCnt); if (effectModel != null) { BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer = ProdBattleCommandBuffer.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandBuffer).GetComponent <ProdBattleCommandBuffer>(), BattleTaskManager.GetStage(), effectModel, _nCurrentShellingCnt); BattleTaskManager.GetPrefabFile().prodBattleCommandBuffer.Play(delegate { if (effectModel.Withdrawal) { BattleTaskManager.ReqPhase(BattlePhase.WithdrawalDecision); } else { CheckNextAction(); } }); } else { CheckNextAction(); } return(false); }
protected override bool Init() { _clsState = new StatementMachine(); _clsBattleResult = BattleTaskManager.GetBattleManager().GetBattleResult(); _listRewardModels = _clsBattleResult.GetRewardItems(); if (_listRewardModels.Count > 0) { for (int i = 0; i < _listRewardModels.Count; i++) { if (_listRewardModels[i] is IReward_Ship) { _clsState.AddState(_initShipGet, _updateShipGet); } if (_listRewardModels[i] is IReward_Slotitem) { _clsState.AddState(_initSlotItemGet, _updateSlotItemGet); } if (_listRewardModels[i] is IReward_Useitem) { _clsState.AddState(_initUseItemGet, _updateUseItemGet); } } } else { BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.ClearReward)); ImmediateTermination(); } return(true); }
private IEnumerator PlayReceiveShip() { _clsRewardShips = new Reward_Ship[_listRewardModels.Count]; _clsRewardShips[0] = (Reward_Ship)_listRewardModels[0]; yield return(new WaitForSeconds(0.5f)); _prodReceiveShip = ProdBattleReceiveShip.Instantiate(PrefabFile.Load <ProdBattleReceiveShip>(PrefabFileInfos.CommonProdBattleReceiveShip), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsRewardShips[0], 120, BattleTaskManager.GetKeyControl()); yield return(new WaitForSeconds(0.1f)); _prodReceiveShip.Play(delegate { BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.ClearReward)); }); }
private bool UpdateProdVeteransReport(object data) { if (!this._prodVeteransReport.Run()) { return(false); } if (BattleTaskManager.GetBattleManager().IsPractice) { this.EndPhase(BattlePhase.AdvancingWithdrawal); } else { BattleTaskManager.ReqPhase(BattleUtils.NextPhase(BattlePhase.Result)); } return(true); }
private void DecideAdvancinsWithDrawalBtn(UIHexButton btn) { BattleManager manager = BattleTaskManager.GetBattleManager(); if (btn.index == 0) { Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { BattleTaskManager.GetBattleManager().SendOffEscapes(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None)); if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0])) { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawalDC); } else { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal); } }); } else { Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None)); if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0])) { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawalDC); } else { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal); } }); } }
protected override bool Init() { BattleManager battleManager = BattleTaskManager.GetBattleManager(); if (battleManager.GetEscapeCandidate() != null) { this._prodEscortShipEvacuation = ProdEscortShipEvacuation.Instantiate((!(this._prefabEscortShipEvacuation != null)) ? PrefabFile.Load <ProdEscortShipEvacuation>(PrefabFileInfos.BattleProdEscortShipEvacuation) : this._prefabEscortShipEvacuation.GetComponent <ProdEscortShipEvacuation>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform(), BattleTaskManager.GetKeyControl(), BattleTaskManager.GetBattleManager().GetEscapeCandidate(), false); 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])) { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawalDC); } else { BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal); } base.ImmediateTermination(); } return(true); }
protected virtual void EndPhase(BattlePhase iPhase) { BattleTaskManager.ReqPhase(iPhase); }