コード例 #1
0
    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;
        }
    }
コード例 #2
0
 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();
 }