private IEnumerator Startup(IObserver <bool> observer) { if (!App.isMasterInit) { yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine()); } MapManager mm = null; if (RetentionData.GetData() != null) { mm = ((!RetentionData.GetData().ContainsKey("sortieMapManager")) ? ((MapManager)RetentionData.GetData()["rebellionMapManager"]) : ((MapManager)RetentionData.GetData()["sortieMapManager"])); } _clsSortieMapTaskManager.Startup((!(SingletonMonoBehaviour <MapTransitionCutManager> .Instance != null)) ? null : SingletonMonoBehaviour <MapTransitionCutManager> .Instance.GetPrefabAreaMap(), mm, OnSetMapManager); RetentionData.Release(); Mst_DataManager.Instance.MakeUIBattleMaster(_clsMapManager.Map.MstId); yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine()); if (SingletonMonoBehaviour <MapTransitionCutManager> .Instance != null) { bool isWait = true; SingletonMonoBehaviour <MapTransitionCutManager> .Instance.Discard(delegate { isWait = false; }); while (isWait) { yield return(new WaitForEndOfFrame()); } } observer.OnNext(value: true); observer.OnCompleted(); }
private void GetGoNextData() { ShipRecoveryType recovery = ShipRecoveryType.None; if (RetentionData.GetData().ContainsKey("shipRecoveryType")) { recovery = (ShipRecoveryType)((int)RetentionData.GetData().get_Item("shipRecoveryType")); } if ((int)RetentionData.GetData().get_Item("rootType") == 0) { SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(false); this.UpdateUIMapManager(); } else { this.UpdateUIMapManager(); SortieMapTaskManager._uiMapManager.InitAfterBattle(); if (SingletonMonoBehaviour <FadeCamera> .Instance.isFadeOut) { Observable.Timer(TimeSpan.FromSeconds(0.5)).Subscribe(delegate(long _) { SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, delegate { this.GoNext(recovery); }); }); } } }
private void ChkNextCell() { if (!_clsMapManger.IsNextFinal()) { if (BattleCutManager.GetBattleType() == Generics.BattleRootType.Rebellion && BattleCutManager.GetBattleManager().ChangeableDeck&& BattleCutManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !BattleCutManager.GetBattleManager().Ships_f[0].HasRecoverMegami() && !BattleCutManager.GetBattleManager().Ships_f[0].HasRecoverYouin()) { BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal); } else if (_clsResultModel.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !ShipUtils.HasRepair(_clsResultModel.Ships_f[0])) { BattleCutManager.ReqPhase(BattleCutPhase.FlagshipWreck); } else { BattleCutManager.ReqPhase(BattleCutPhase.EscortShipEvacuation); } } else if (SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true); SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; 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(); RetentionData.SetData(BattleUtils.GetRetentionDataMapOpen(BattleCutManager.GetMapManager(), _clsResultModel)); SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } }
private void OnFormationSelected(BattleFormationKinds1 iFormation) { SortieMapTaskManager.GetUIShipCharacter().Hide(null); SortieMapTaskManager.GetUIAreaMapFrame().Hide(); ProdSortieTransitionToBattle prodSortieTransitionToBattle = SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle; SortieBattleTaskManager.GetTransitionCamera().enabled = true; prodSortieTransitionToBattle.Play(delegate { Hashtable hashtable = new Hashtable(); if (SortieBattleTaskManager.GetMapManager().GetType().Equals(typeof(RebellionMapManager))) { hashtable.Add("rootType", Generics.BattleRootType.Rebellion); hashtable.Add("rebellionMapManager", SortieBattleTaskManager.GetMapManager()); } else { hashtable.Add("rootType", Generics.BattleRootType.SortieMap); hashtable.Add("sortieMapManager", SortieBattleTaskManager.GetMapManager()); } hashtable.Add("formation", iFormation); RetentionData.SetData(hashtable); SortieBattleTaskManager.ReqMode(SortieBattleMode.Battle); }); }
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 static bool InitRebellionBattle() { BattleFormationKinds1 formation_id = (BattleFormationKinds1)(int)RetentionData.GetData()["formation"]; _clsBattleManager = ((RebellionMapManager)SortieBattleTaskManager.GetMapManager()).BattleStart(formation_id); return(true); }
private void GetGoNextData() { ShipRecoveryType recovery = ShipRecoveryType.None; if (RetentionData.GetData().ContainsKey("shipRecoveryType")) { recovery = (ShipRecoveryType)(int)RetentionData.GetData()["shipRecoveryType"]; } if ((int)RetentionData.GetData()["rootType"] == 0) { SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : false); UpdateUIMapManager(); return; } UpdateUIMapManager(); _uiMapManager.InitAfterBattle(); if (SingletonMonoBehaviour <FadeCamera> .Instance.isFadeOut) { Observable.Timer(TimeSpan.FromSeconds(0.5)).Subscribe(delegate { SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, delegate { GoNext(recovery); }); }); } }
private void DecideAdvancinsWithDrawalBtn(UIHexButtonEx btn) { if (btn.index == 2) { MapManager mapManager = SortieBattleTaskManager.GetMapManager(); mapManager.ChangeCurrentDeck(); } if (BattleTaskManager.IsSortieBattle() && SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawal(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None)); if (btn.index == 0) { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); } else { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = true; Dlg.Call <ShipRecoveryType>(ref this._actOnGotoSortieMap, ShipRecoveryType.None); } }); } }
private void _decideButton(int nIndex) { if (!(this.ShortCutBtnManager.ButtonManager.nowForcusButton.disabledSprite == this.ShortCutBtnManager.ButtonManager.nowForcusButton.hoverSprite)) { this.isCloseAnimNow = true; if (PortObjectManager.isPrefabSecene(this._dicBtns.get_Item(nIndex).Scene) && !SingletonMonoBehaviour <PortObjectManager> .Instance.isLoadSecene()) { SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(this._dicBtns.get_Item(nIndex).Scene, false); } else { if (this._dicBtns.get_Item(nIndex).Scene == Generics.Scene.SaveLoad) { Hashtable hashtable = new Hashtable(); hashtable.Add("rootType", Generics.Scene.Strategy); RetentionData.SetData(hashtable); } SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(this._dicBtns.get_Item(nIndex).Scene); this.CloseMenu(); } return; } string mes = string.Empty; if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Count == 0) { CommonPopupDialog.Instance.StartPopup("艦隊を編成する必要があります"); return; } if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.HasBling()) { CommonPopupDialog.Instance.StartPopup("撤退中の艦が含まれています"); return; } switch (this._dicBtns.get_Item(nIndex).Scene) { case Generics.Scene.Repair: mes = "この海域には入渠ドックがありません"; break; case Generics.Scene.Arsenal: mes = "鎮守府海域でのみ選択可能です"; break; case Generics.Scene.ImprovementArsenal: if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID != 1) { mes = "鎮守府海域でのみ選択可能です"; } else { mes = "旗艦が工作艦である必要があります"; } break; } CommonPopupDialog.Instance.StartPopup(mes); }
public int[] getNewOpenArea() { int[] result = null; if (RetentionData.GetData() != null) { result = (int[])RetentionData.GetData()["newOpenAreaIDs"]; } return(result); }
private void OnPictureStoryShowConfirmCancel() { _clsState.Clear(); Hashtable hashtable = new Hashtable(); hashtable.Add("TutorialCancel", true); RetentionData.SetData(hashtable); OnPictureStoryShowFinished(); }
private static bool InitPracticeBattle() { int enemy_deck_id = (int)RetentionData.GetData()["deckID"]; BattleFormationKinds1 formation_id = (BattleFormationKinds1)(int)RetentionData.GetData()["formation"]; PracticeManager practiceManager = RetentionData.GetData()["practiceManager"] as PracticeManager; _clsBattleManager = practiceManager.StartBattlePractice(enemy_deck_id, formation_id); return(true); }
public void OnClickHouseButton() { if (isMoveable()) { Hashtable hashtable = new Hashtable(); hashtable.Add(UserInterfaceItemManager.SHARE_DATA_START_AT_KEY, UserInterfaceItemManager.SHARE_DATA_START_AT_VALUE_ITEMLIST); RetentionData.SetData(hashtable); SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(Generics.Scene.Item); } }
public RebellionMapManager checkRebellionResult() { Hashtable data = RetentionData.GetData(); RebellionMapManager result = null; if (data != null) { result = (data["rebellionMapManager"] as RebellionMapManager); } return(result); }
private void SetStartupData() { if (RetentionData.GetData() != null) { Hashtable data = RetentionData.GetData(); _clsData.Difficlty = (DifficultKind)(int)data["difficulty"]; _clsData.isInherit = (data.ContainsKey("isInherit") ? true : false); _clsData.AdmiralName = ((!data.ContainsKey("isInherit")) ? string.Empty : App.GetTitleManager().UserName); } RetentionData.Release(); }
private void SetStartupData() { if (RetentionData.GetData() != null) { Hashtable data = RetentionData.GetData(); StartupTaskManager._clsData.Difficlty = (DifficultKind)((int)data.get_Item("difficulty")); StartupTaskManager._clsData.isInherit = data.ContainsKey("isInherit"); StartupTaskManager._clsData.AdmiralName = ((!data.ContainsKey("isInherit")) ? string.Empty : App.GetTitleManager().UserName); } RetentionData.Release(); }
private bool OnStartSortieStage() { mKeyController.IsRun = false; mKeyController.ClearKeyAll(); SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false; SingletonMonoBehaviour <Live2DModel> .Instance.forceStop(); SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <NowLoadingAnimation> .Instance.isNowLoadingAnimation = true; SoundUtils.PlaySE(SEFIleInfos.CommonEnter3); DebugUtils.SLog("OnStartSortieStage1"); mStageConfirm.Hide(); DebugUtils.SLog("OnStartSortieStage2"); DOTween.Sequence().Append(mRouletteSelector.transform.DOLocalMoveY(0f, 0.4f).SetEase(Ease.OutBounce)).Join(mRouletteSelector.transform.DOScale(new Vector3(1.6f, 1.6f, 1f), 0.3f)); ShipUtils.PlayShipVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip(), App.rand.Next(13, 15)); DebugUtils.SLog("OnStartSortieStage3"); this.DelayAction(0.5f, delegate { DebugUtils.SLog("OnStartSortieStage mStageConfirm.ClickAnimation"); MapModel mMapModel = mStageConfirm.mMapModel; RetentionData.SetData(new Hashtable { { "sortieMapManager", mSortieManager.GoSortie(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id, mMapModel.MstId) }, { "rootType", 0 }, { "shipRecoveryType", ShipRecoveryType.None }, { "escape", false } }); UnityEngine.Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); UnityEngine.Object.Destroy(GameObject.Find("Information Root")); UnityEngine.Object.Destroy(GameObject.Find("OverView")); StartCoroutine(AsyncLoad()); MapTransitionCutManager component = Util.Instantiate(mPrefab_MapTransitionCutManager.gameObject, base.transform.root.Find("Map Root").gameObject).GetComponent <MapTransitionCutManager>(); component.transform.localPosition = mStrategyTopTaskManager.strategyCamera.transform.localPosition + new Vector3(-26.4f, -43f, 496.4f); component.Initialize(mMapModel, mAsyncOperation); TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; SingletonMonoBehaviour <AppInformation> .Instance.NextLoadType = AppInformation.LoadType.Ship; DebugUtils.SLog("OnStartSortieStage mStageConfirm.ClickAnimation END"); }); DebugUtils.SLog("OnStartSortieStage4"); return(false); }
private void _onFlagshipWreckFinished() { if (BattleTaskManager.IsSortieBattle() && SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { RetentionData.SetData(BattleUtils.GetRetentionDataFlagshipWreck(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None)); SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } }
private void DecideSortieStart() { DebugUtils.Log("TaskRebellionOrganize", string.Empty); RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); List <UIRebellionParticipatingFleetInfo> participatingFleetList = _ctrlRebellionOrganize.participatingFleetSelector.participatingFleetList; UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo2 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattlePrimaryFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo3 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardSupportFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo4 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattleSupportFleet); int[] array = new int[4] { (!(uIRebellionParticipatingFleetInfo == null)) ? uIRebellionParticipatingFleetInfo.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo2 == null)) ? uIRebellionParticipatingFleetInfo2.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo3 == null)) ? uIRebellionParticipatingFleetInfo3.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo4 == null)) ? uIRebellionParticipatingFleetInfo4.deckModel.Id : (-1) }; bool flag = rebellionManager.IsGoRebellion(array[0], array[1], array[2], array[3]); List <IsGoCondition> list = null; List <IsGoCondition> list2 = null; if (array[2] != -1) { list = rebellionManager.IsValidMissionSub(array[2]); } if (array[3] != -1) { list2 = rebellionManager.IsValid_MissionMain(array[3]); } bool flag2 = list == null || (list != null && list.Count == 0); bool flag3 = list2 == null || (list2 != null && list2.Count == 0); if (flag && flag2 && flag3) { RebellionMapManager rebellionMapManager = rebellionManager.GoRebellion(array[0], array[1], array[2], array[3]); MapModel map = rebellionMapManager.Map; Hashtable hashtable = new Hashtable(); hashtable.Add("rebellionMapManager", rebellionMapManager); hashtable.Add("rootType", 0); hashtable.Add("shipRecoveryType", ShipRecoveryType.None); hashtable.Add("escape", false); RetentionData.SetData(hashtable); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks(); StartCoroutine(PlayTransition(map, uIRebellionParticipatingFleetInfo2.deckModel)); } SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); }
private StartAt GetStartAt() { if (RetentionData.GetData() != null && RetentionData.GetData().Contains(SHARE_DATA_START_AT_KEY)) { object obj = RetentionData.GetData()[SHARE_DATA_START_AT_KEY]; if (obj == SHARE_DATA_START_AT_VALUE_ITEMLIST) { return(StartAt.ItemList); } if (obj == SHARE_DATA_START_AT_VALUE_ITEMSTORE) { return(StartAt.ItemStore); } } return(StartAt.ItemList); }
private IEnumerator LoadTutorial(DifficultKind difficultKind) { RetentionData.SetData(new Hashtable { { "difficulty", difficultKind } }); AsyncOperation async = Application.LoadLevelAsync(Generics.Scene.Startup.ToString()); async.allowSceneActivation = false; while (!App.isMasterInit) { yield return(new WaitForEndOfFrame()); } async.allowSceneActivation = true; }
private void Start() { this._SM = SingletonMonoBehaviour <SoundManager> .Instance; this._instance = VitaSaveManager.Instance; this._instance.Open(this); this._Label_status = GameObject.Find("Label_status").GetComponent <UILabel>(); this.BackScene = Generics.Scene.PortTop; this._Set_Status(SaveLoad.Now_State.Idle); this._SceneName = Application.get_loadedLevelName(); Debug.Log("Application.loadedLevelName: " + this._SceneName); Hashtable hashtable = null; if (RetentionData.GetData() != null) { hashtable = RetentionData.GetData(); } if (hashtable == null || (int)hashtable.get_Item("rootType") != 1) { this._Set_Execute_Mode(SaveLoad.Execute_Mode.Save_Mode); if ((int)hashtable.get_Item("rootType") == 21) { this.BackScene = Generics.Scene.Strategy; } } else { this._Set_Execute_Mode(SaveLoad.Execute_Mode.Load_Mode); } if (hashtable != null) { RetentionData.Release(); } if (this._Execute_Mode == SaveLoad.Execute_Mode.Load_Mode) { DebugUtils.SLog("ロードを実行します"); this._DO_LOAD(); } else if (this._Execute_Mode == SaveLoad.Execute_Mode.Save_Mode) { Debug.Log("セーブを実行します"); this._DO_SAVE(); SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null, true, true); } }
private void Start() { _SM = SingletonMonoBehaviour <SoundManager> .Instance; _instance = VitaSaveManager.Instance; _instance.Open(this); _Label_status = GameObject.Find("Label_status").GetComponent <UILabel>(); BackScene = Generics.Scene.PortTop; _Set_Status(Now_State.Idle); _SceneName = Application.loadedLevelName; Debug.Log("Application.loadedLevelName: " + _SceneName); Hashtable hashtable = null; if (RetentionData.GetData() != null) { hashtable = RetentionData.GetData(); } if (hashtable == null || (int)hashtable["rootType"] != 1) { _Set_Execute_Mode(Execute_Mode.Save_Mode); if ((int)hashtable["rootType"] == 21) { BackScene = Generics.Scene.Strategy; } } else { _Set_Execute_Mode(Execute_Mode.Load_Mode); } if (hashtable != null) { RetentionData.Release(); } if (_Execute_Mode == Execute_Mode.Load_Mode) { DebugUtils.SLog("ロ\u30fcドを実行します"); _DO_LOAD(); } else if (_Execute_Mode == Execute_Mode.Save_Mode) { Debug.Log("セ\u30fcブを実行します"); _DO_SAVE(); SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null); } }
public static IEnumerator GotoLoadScene(IObserver <AsyncOperation> observer) { RetentionData.SetData(new Hashtable { { "rootType", Generics.Scene.Title } }); AsyncOperation async = Application.LoadLevelAsync(Generics.Scene.SaveLoad.ToString()); async.allowSceneActivation = false; while (!App.isMasterInit) { yield return(Observable.NextFrame(FrameCountType.EndOfFrame)); } observer.OnNext(async); observer.OnCompleted(); }
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); }
private IEnumerator GotoNextScene() { _LoadingShip = GameObject.Find("UILoadingShip").GetComponent <UILoadingShip>(); key.IsRun = false; yield return(StartCoroutine(DifficultySelectExit())); yield return(new WaitForEndOfFrame()); RetentionData.SetData(new Hashtable { { "isInherit", true }, { "difficulty", diffculty } }); Application.LoadLevel(Generics.Scene.Startup.ToString()); yield return(null); }
private void InitBattleData() { if (RetentionData.GetData() != null) { _iRootType = (Generics.BattleRootType)(int) RetentionData.GetData()["rootType"]; switch (_iRootType) { case Generics.BattleRootType.SortieMap: InitSortieBattle(); break; case Generics.BattleRootType.Practice: InitPracticeBattle(); break; case Generics.BattleRootType.Rebellion: InitRebellionBattle(); break; } RetentionData.Release(); } SetSkyType(_clsBattleManager); }
private void OnDecideAdvancingWithdrawal(AdvancingWithdrawalType iType) { switch (iType) { case AdvancingWithdrawalType.Withdrawal: if (SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true); SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { Mst_DataManager.Instance.PurgeUIBattleMaster(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawal(BattleCutManager.GetMapManager(), ShipRecoveryType.None)); SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } break; case AdvancingWithdrawalType.Advance: BattleCutManager.EndBattleCut(ShipRecoveryType.None); break; case AdvancingWithdrawalType.AdvancePrimary: { MapManager mapManager = BattleCutManager.GetMapManager(); mapManager.ChangeCurrentDeck(); BattleCutManager.EndBattleCut(ShipRecoveryType.None); break; } } SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume; SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume = BattleDefines.SOUND_KEEP.BGMVolume; Object.Destroy(_prodBCAdvancingWithdrawal.gameObject); Mem.Del(ref _prodBCAdvancingWithdrawal); }
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 = BattleCutManager.GetBattleManager(); if (btn.index == 0) { Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { BattleCutManager.GetBattleManager().SendOffEscapes(); RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(BattleCutManager.GetMapManager(), ShipRecoveryType.None)); if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0])) { BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC); } else { BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal); } }); } else { Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _) { RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(BattleCutManager.GetMapManager(), ShipRecoveryType.None)); if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0])) { BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC); } else { BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal); } }); } }