private void DecideAdvancinsWithDrawalBtn(UIHexButton btn) { if (BattleTaskManager.IsSortieBattle()) { SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = ((btn.index != 0) ? Generics.Scene.SortieAreaMap : Generics.Scene.Strategy); SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = ((SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene == Generics.Scene.SortieAreaMap) ? true : false); SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { if (btn.index == 1) { TrophyUtil.Unlock_At_GoNext(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.Personnel)); Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.Personnel); } else if (btn.index == 2) { TrophyUtil.Unlock_At_GoNext(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.Goddes)); Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.Goddes); } else if (btn.index == 3) { MapManager mapManager = SortieBattleTaskManager.GetMapManager(); mapManager.ChangeCurrentDeck(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(mapManager, ShipRecoveryType.None)); Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.None); } else { RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None)); SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); } }); } }
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); } }); } }