private IEnumerator TurnEndSpeed(int turn) { for (int i = 0; i < turn; i++) { StrategyTopTaskManager.GetTurnEnd().DebugTurnEnd(); if (i % 100 == 0) { yield return(new WaitForEndOfFrame()); CommonPopupDialog.Instance.StartPopup(StrategyTopTaskManager.GetLogicManager().Turn.ToString()); } } yield return(null); CommonPopupDialog.Instance.StartPopup(StrategyTopTaskManager.GetLogicManager().Turn.ToString()); }
private bool pushTurnEnd() { Debug.Log("ターンエンド"); StrategyTopTaskManager.GetTurnEnd().TurnEnd(); this.CommandMenu.MenuExit(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.TurnEnd); this.sceneChange = false; if (StrategyTopTaskManager.Instance.TutorialGuide8_1 != null) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } StrategyTopTaskManager.Instance.TutorialGuide8_1.HideAndDestroy(); } return(true); }
private bool KeyAction() { if (DeckSelectController.IsChangeIndex) { bool isNext = (DeckSelectController.prevIndexChangeValue == 1) ? true : false; SearchAndChangeDeck(isNext, isSeachLocalArea: false); if (prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); if (StrategyTopTaskManager.Instance.UIModel.Character.shipModel != null) { StrategyTopTaskManager.GetSailSelect().moveCharacterScreen(isEnter: true, null); } } return(true); } if (StrategyAreaManager.sailKeyController.IsChangeIndex) { areaManager.UpdateSelectArea(StrategyAreaManager.sailKeyController.Index); } else if (DeckSelectController.keyState[1].down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() == null) { GotoOrganize(); } else { OpenCommandMenu(); } } else if (DeckSelectController.keyState[3].down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShipCount() != 0) { if (prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } uiGoSortieConfirm.SetKeyController(new KeyControl()); commonDialog.OpenDialog(2, DialogAnimation.AnimType.FEAD); uiGoSortieConfirm.Initialize(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck, isConfirm: false); commonDialog.setCloseAction(delegate { KeyControlManager.Instance.KeyController = DeckSelectController; if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }); SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } } else if (DeckSelectController.keyState[5].down) { SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize(); } else if (DeckSelectController.keyState[0].down) { areaManager.UpdateSelectArea(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID); } else if (DeckSelectController.keyState[2].down) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } commonDialog.OpenDialog(4); commonDialog.keyController.IsRun = false; commonDialog.setOpenAction(delegate { commonDialog.keyController.IsRun = true; }); commonDialog.ShikakuButtonAction = delegate { Close(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.TurnEnd); StrategyTopTaskManager.GetTurnEnd().TurnEnd(); if (StrategyTopTaskManager.Instance.TutorialGuide8_1 != null) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } StrategyTopTaskManager.Instance.TutorialGuide8_1.HideAndDestroy(); } }; commonDialog.BatuButtonAction = delegate { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }; } return(true); }
protected override bool Run() { this.keyController.Update(); if (!TaskStrategyDebug.isControl) { if (this.keyController.keyState.get_Item(0).down) { this.rootPrefab.SetActive(false); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.StrategyTopTaskManagerMode_ST); return(false); } return(true); } else { if (this.keyController.keyState.get_Item(1).down) { SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } this.setMag(); if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(5).press) { Application.LoadLevel(Generics.Scene.Ending.ToString()); } else if (this.keyController.keyState.get_Item(5).press&& this.keyController.keyState.get_Item(2).down) { App.isInvincible = !App.isInvincible; CommonPopupDialog.Instance.StartPopup("無敵モード" + App.isInvincible); } else if (this.keyController.keyState.get_Item(4).press&& this.keyController.keyState.get_Item(2).down) { for (int i = 1; i < 15; i++) { EscortDeckManager escortDeckManager = new EscortDeckManager(i); if (StrategyTopTaskManager.GetLogicManager().UserInfo.ShipCountData().NowCount > 300) { for (int j = 0; j < 300; j++) { if (StrategyTopTaskManager.GetLogicManager().UserInfo.GetShip(1 + j).IsInEscortDeck() == -1 && escortDeckManager.ChangeOrganize(6, 1 + j)) { break; } } } StrategyTopTaskManager.GetLogicManager().Deploy(i, 10, escortDeckManager); } CommonPopupDialog.Instance.StartPopup("自動配備しました"); } else if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(4).press) { CommonPopupDialog.Instance.StartPopup("ゲームクリア!!"); TaskStrategyDebug.ForceEnding = true; } else if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(3).press) { if (this.turnend == null) { this.turnend = base.StartCoroutine(this.TurnEndSpeed(3495)); } } else if (this.keyController.keyState.get_Item(6).press&& this.keyController.keyState.get_Item(2).press) { StrategyTopTaskManager.GetTurnEnd().DebugTurnEnd(); CommonPopupDialog.Instance.StartPopup(StrategyTopTaskManager.GetLogicManager().Turn.ToString()); } else if (this.keyController.keyState.get_Item(6).down) { StrategyTopTaskManager.Instance.GameOver(); this.keyController.firstUpdate = true; } else if (this.keyController.keyState.get_Item(3).down) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; for (int k = 0; k < 20; k++) { tutorial.SetStepTutorialFlg(k); } for (int l = 0; l < 99; l++) { tutorial.SetKeyTutorialFlg(l); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } } if (this.keyController.keyState.get_Item(7).down&& this.keyController.keyState.get_Item(4).press) { GameObject.Find("SingletonObject").AddComponent <TEST_Voyage>().StartVoyage(); } if (this.keyController.keyState.get_Item(7).down&& this.keyController.keyState.get_Item(5).press) { Object.Destroy(GameObject.Find("Live2DRender").get_gameObject()); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.get_gameObject()); Object.Destroy(GameObject.Find("SingletonObject").get_gameObject()); this.DelayActionFrame(3, delegate { Application.LoadLevel("TestEmptyScene"); this.DelayAction(5f, delegate { Resources.UnloadUnusedAssets(); }); }); } if (this.keyController.keyState.get_Item(4).hold&& this.keyController.keyState.get_Item(5).hold) { if (base.get_gameObject().get_name() == "DebugMenuNormal") { this.DebugMenuNormal.SetActive(false); this.DebugMode1.SetActive(true); this.DebugMode3.SetActive(true); } else { this.DebugMenuNormal.SetActive(true); this.DebugMode1.SetActive(false); this.DebugMode3.SetActive(false); } StrategyTopTaskManager.SetDebug(this.AnotherMode); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.Debug); return(false); } if (!Diagnostics.get_enableHUD() && this.keyController.keyState.get_Item(4).press&& this.keyController.keyState.get_Item(5).press&& this.keyController.keyState.get_Item(2).down) { Diagnostics.set_enableHUD(true); } return(this.ModeRun()); } }
private bool KeyAction() { if (this.DeckSelectController.IsChangeIndex) { bool isNext = this.DeckSelectController.prevIndexChangeValue == 1; this.SearchAndChangeDeck(isNext, false); if (this.prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { this.changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); if (StrategyTopTaskManager.Instance.UIModel.Character.shipModel != null) { StrategyTopTaskManager.GetSailSelect().moveCharacterScreen(true, null); } } return(true); } if (StrategyAreaManager.sailKeyController.IsChangeIndex) { this.areaManager.UpdateSelectArea(StrategyAreaManager.sailKeyController.Index, false); } else if (this.DeckSelectController.keyState.get_Item(1).down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() == null) { this.GotoOrganize(); } else { this.OpenCommandMenu(); } } else if (this.DeckSelectController.keyState.get_Item(3).down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShipCount() != 0) { if (this.prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { this.changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } this.uiGoSortieConfirm.SetKeyController(new KeyControl(0, 0, 0.4f, 0.1f)); this.commonDialog.OpenDialog(2, DialogAnimation.AnimType.FEAD); this.uiGoSortieConfirm.Initialize(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck, false); this.commonDialog.setCloseAction(delegate { KeyControlManager.Instance.KeyController = this.DeckSelectController; if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }); SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } } else if (this.DeckSelectController.keyState.get_Item(5).down) { SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize(); } else if (this.DeckSelectController.keyState.get_Item(0).down) { this.areaManager.UpdateSelectArea(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID, false); } else if (this.DeckSelectController.keyState.get_Item(2).down) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } this.commonDialog.OpenDialog(4, DialogAnimation.AnimType.POPUP); this.commonDialog.keyController.IsRun = false; this.commonDialog.setOpenAction(delegate { this.commonDialog.keyController.IsRun = true; }); this.commonDialog.ShikakuButtonAction = delegate { base.Close(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.TurnEnd); StrategyTopTaskManager.GetTurnEnd().TurnEnd(); if (StrategyTopTaskManager.Instance.TutorialGuide8_1 != null) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } StrategyTopTaskManager.Instance.TutorialGuide8_1.HideAndDestroy(); } }; this.commonDialog.BatuButtonAction = delegate { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }; } return(true); }
protected override bool Run() { keyController.Update(); if (!isControl) { if (keyController.keyState[0].down) { rootPrefab.SetActive(false); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.StrategyTopTaskManagerMode_ST); return(false); } return(true); } if (keyController.keyState[1].down) { SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } setMag(); if (keyController.keyState[6].down && keyController.keyState[5].press) { Application.LoadLevel(Generics.Scene.Ending.ToString()); } else if (keyController.keyState[5].press && keyController.keyState[2].down) { App.isInvincible = !App.isInvincible; CommonPopupDialog.Instance.StartPopup("無敵モ\u30fcド" + App.isInvincible); } else if (keyController.keyState[4].press && keyController.keyState[2].down) { for (int i = 1; i < 15; i++) { EscortDeckManager escortDeckManager = new EscortDeckManager(i); MemberMaxInfo memberMaxInfo = StrategyTopTaskManager.GetLogicManager().UserInfo.ShipCountData(); if (memberMaxInfo.NowCount > 300) { for (int j = 0; j < 300 && (StrategyTopTaskManager.GetLogicManager().UserInfo.GetShip(1 + j).IsInEscortDeck() != -1 || !escortDeckManager.ChangeOrganize(6, 1 + j)); j++) { } } StrategyTopTaskManager.GetLogicManager().Deploy(i, 10, escortDeckManager); } CommonPopupDialog.Instance.StartPopup("自動配備しました"); } else if (keyController.keyState[6].down && keyController.keyState[4].press) { CommonPopupDialog.Instance.StartPopup("ゲ\u30fcムクリア!!"); ForceEnding = true; } else if (keyController.keyState[6].down && keyController.keyState[3].press) { if (turnend == null) { turnend = StartCoroutine(TurnEndSpeed(3495)); } } else if (keyController.keyState[6].press && keyController.keyState[2].press) { StrategyTopTaskManager.GetTurnEnd().DebugTurnEnd(); CommonPopupDialog.Instance.StartPopup(StrategyTopTaskManager.GetLogicManager().Turn.ToString()); } else if (keyController.keyState[6].down) { StrategyTopTaskManager.Instance.GameOver(); keyController.firstUpdate = true; } else if (keyController.keyState[3].down) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; for (int k = 0; k < 20; k++) { tutorial.SetStepTutorialFlg(k); } for (int l = 0; l < 99; l++) { tutorial.SetKeyTutorialFlg(l); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } } if (keyController.keyState[7].down && keyController.keyState[4].press) { GameObject.Find("SingletonObject").AddComponent <TEST_Voyage>().StartVoyage(); } if (keyController.keyState[7].down && keyController.keyState[5].press) { UnityEngine.Object.Destroy(GameObject.Find("Live2DRender").gameObject); UnityEngine.Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); UnityEngine.Object.Destroy(GameObject.Find("SingletonObject").gameObject); this.DelayActionFrame(3, delegate { Application.LoadLevel("TestEmptyScene"); this.DelayAction(5f, delegate { Resources.UnloadUnusedAssets(); }); }); } if (keyController.keyState[4].hold && keyController.keyState[5].hold) { if (base.gameObject.name == "DebugMenuNormal") { DebugMenuNormal.SetActive(isActive: false); DebugMode1.SetActive(isActive: true); DebugMode3.SetActive(isActive: true); } else { DebugMenuNormal.SetActive(isActive: true); DebugMode1.SetActive(isActive: false); DebugMode3.SetActive(isActive: false); } StrategyTopTaskManager.SetDebug(AnotherMode); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.Debug); return(false); } if (!Diagnostics.enableHUD && keyController.keyState[4].press && keyController.keyState[5].press && keyController.keyState[2].down) { Diagnostics.enableHUD = true; } return(ModeRun()); }