private IEnumerator Start() { OrganizeTaskManager._clsTasks = base.gameObject.SafeGetComponent <SceneTasksMono>(); OrganizeTaskManager._mainObj = GameObject.Find("DeployOrganizePanel").gameObject; GameObject task = base.transform.FindChild("Task").gameObject; _clsTop = ((Component)task.transform.FindChild("TaskTop")).GetComponent <TaskEscortOrganizeTop>(); _clsDetail = ((Component)task.transform.FindChild("TaskDetail")).GetComponent <TaskEscortOrganizeDetail>(); _clsList = ((Component)task.transform.FindChild("TaskList")).GetComponent <TaskEscortOrganizeList>(); _clsListDetail = ((Component)task.transform.FindChild("TaskListDetail")).GetComponent <TaskEscortOrganizeListDetail>(); OrganizeTaskManager._clsTasks.Init(); OrganizeTaskManager._iPhase = (OrganizeTaskManager._iPhaseReq = OrganizePhase.Phase_ST); if (EscortLogicManager == null) { EscortLogicManager = new EscortDeckManager(StrategyAreaManager.FocusAreaID); } EscortLogicManager.InitEscortOrganizer(); _clsDetail.FirstInit(); _clsList.FirstInit(); _clsListDetail.FirstInit(); isRun = false; yield return(new WaitForEndOfFrame()); _clsTop.FirstInit(); _clsTop.ShowBanner(); yield return(new WaitForSeconds(0.4f)); isRun = true; yield return(null); }
public void updateMaterials(int areaID, int tankerCount, EscortDeckManager manager) { Dictionary <enumMaterialCategory, int> areaResource = Utils.GetAreaResource(areaID, tankerCount, manager); this.MaterialNums[0].text = areaResource.get_Item(enumMaterialCategory.Fuel).ToString(); this.MaterialNums[1].text = areaResource.get_Item(enumMaterialCategory.Steel).ToString(); this.MaterialNums[2].text = areaResource.get_Item(enumMaterialCategory.Bull).ToString(); this.MaterialNums[3].text = areaResource.get_Item(enumMaterialCategory.Bauxite).ToString(); }
public void updateMaterials(int areaID, int tankerCount, EscortDeckManager manager) { Dictionary <enumMaterialCategory, int> areaResource = local.utils.Utils.GetAreaResource(areaID, tankerCount, manager); MaterialNums[0].text = areaResource[enumMaterialCategory.Fuel].ToString(); MaterialNums[1].text = areaResource[enumMaterialCategory.Steel].ToString(); MaterialNums[2].text = areaResource[enumMaterialCategory.Bull].ToString(); MaterialNums[3].text = areaResource[enumMaterialCategory.Bauxite].ToString(); }
public static void CreateLogicManager() { EscortLogicManager = new EscortDeckManager(StrategyAreaManager.FocusAreaID); }
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()); } }
public static Dictionary <enumMaterialCategory, int> GetAreaResource(int area_id, int tanker_count, EscortDeckManager eManager) { DeckShips deckShip = null; if (eManager != null && eManager.EditDeck != null) { deckShip = ((TemporaryEscortDeckModel)eManager.EditDeck).DeckShips; } return(new Api_req_Transport().GetMaterialNum(area_id, tanker_count, deckShip)); }
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()); }