Ejemplo n.º 1
0
 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());
     }
 }
Ejemplo n.º 2
0
 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());
 }