public void SwitchToProcessMenu(int Value) { if (Value != MaxValueCount_Crutch) { ProcessesMenuSectionSelect.Hide(); switch (Value) { case 0: //Создание нового процесса _PlayerControl._PopupMode = true; MainMenuPanelGameObject.SetActive(false); ProcessCreationPanelGameObject.SetActive(true); Links.Processes.ValueChanged(0); break; default: Log.Warning(scr, "Trying to open unknown process menu section " + Value); break; } MaxValueCount_Crutch = ProcessesMenuSectionSelect.options.Count; ProcessesMenuSectionSelect.options.Add(new Dropdown.OptionData("Exit")); ProcessesMenuSectionSelect.value = MaxValueCount_Crutch; ProcessesMenuSectionSelect.options.RemoveAt(MaxValueCount_Crutch); MaxValueCount_Crutch = -1; } }
public void SwitchToStructureMenu(int Value) { if (Value != MaxValueCount_Crutch) { StructureMenuSectionSelect.Hide(); switch (Value) { case 0: //Создание нового здания _PlayerControl._PopupMode = true; //Writing the code on the seashore in the Sudak towns, Chaikhana hotel MainMenuPanelGameObject.SetActive(false); StructureCreationPanelGameObject.SetActive(true); Links.Builder.BuildingModeOn(Links.MainCamera.transform.position + 6 * Vector3.Normalize(Links.MainCamera.transform.forward)); break; case 1: _PlayerControl.UpdateBuildingsList(); MainMenuPanelGameObject.SetActive(false); StructurePlacingPanelGameObject.SetActive(true); break; default: Log.Warning(scr, "Trying to open unknown structure menu section " + Value); break; } MaxValueCount_Crutch = StructureMenuSectionSelect.options.Count; StructureMenuSectionSelect.options.Add(new Dropdown.OptionData("Exit")); StructureMenuSectionSelect.value = MaxValueCount_Crutch; StructureMenuSectionSelect.options.RemoveAt(MaxValueCount_Crutch); MaxValueCount_Crutch = -1; } }
public void SwitchToMainMenu() { _PlayerControl._PopupMode = false; StructureCreationPanelGameObject.SetActive(false); StructurePlacingPanelGameObject.SetActive(false); ProcessCreationPanelGameObject.SetActive(false); ZoneCreationPanelGameObject.SetActive(false); MainMenuPanelGameObject.SetActive(true); ProcessesMenuSectionSelect.Hide(); StructureMenuSectionSelect.Hide(); }
public void SwitchToZoneMenu(int Value) { if (Value != MaxValueCount_Crutch) { ZoneMenuSectionSelect.Hide(); switch (Value) { case 0: //Создание нового процесса MainMenuPanelGameObject.SetActive(false); ZoneCreationPanelGameObject.SetActive(true); break; default: Log.Warning(scr, "Trying to open unknown zone menu section " + Value); break; } MaxValueCount_Crutch = ZoneMenuSectionSelect.options.Count; ZoneMenuSectionSelect.options.Add(new Dropdown.OptionData("Exit")); ZoneMenuSectionSelect.value = MaxValueCount_Crutch; ZoneMenuSectionSelect.options.RemoveAt(MaxValueCount_Crutch); MaxValueCount_Crutch = -1; } }