public void OnGenerateTwoPartLevelButtonClick() { var firstLevelPartName = int.Parse(GameObject.Find("FirstLevelPartNameInputField").GetComponent <InputField>().text); var secondLevelPartName = int.Parse(GameObject.Find("SecondLevelPartNameInputField").GetComponent <InputField>().text); //GenerateRandomLevel(numberOfRooms, roomsMaxWight, roomsMaxHeight, roomsMinWight, roomsMinHeight); ArcadeLevelGeneration.GenerateTwoPartLevel(firstLevelPartName, secondLevelPartName); ConstractorUI.EditorCanvas.SetActive(true); ConstractorUI.MainGame.SetActive(true); ConstractorUI.LevelGenerationMenu.SetActive(false); }
public void OnGenerateRandomLevelButtonClick() { var numberOfRooms = int.Parse(GameObject.Find("NumberOfRoomsInputField").GetComponent <InputField>().text); //var roomsMaxWight = int.Parse(GameObject.Find("RoomMaxWidthInputField").GetComponent<InputField>().text); //var roomsMaxHeight = int.Parse(GameObject.Find("RoomMaxHeightInputField").GetComponent<InputField>().text); //var roomsMinWight = int.Parse(GameObject.Find("RoomMinWidthInputField").GetComponent<InputField>().text); //var roomsMinHeight = int.Parse(GameObject.Find("RoomMinHeightInputField").GetComponent<InputField>().text); //GenerateRandomLevel(numberOfRooms, roomsMaxWight, roomsMaxHeight, roomsMinWight, roomsMinHeight); Globals.LoadAllLevelParts(); ArcadeLevelGeneration.GenerateRandomLevel(numberOfRooms); ConstractorUI.EditorCanvas.SetActive(true); ConstractorUI.MainGame.SetActive(true); ConstractorUI.LevelGenerationMenu.SetActive(false); }
public void OnArcadeButtonClick() { var mainGameObject = ConstractorUI.MainGame.transform; Globals.LoadAllLevelParts(); ArcadeLevelGeneration.GenerateRandomLevel(1); Globals.IsArcadeMode = true; Globals.GenerateLevel(mainGameObject, GameplaySettings.MainCamera); var canvas = ConstractorUI.EditorCanvas; canvas.SetActive(false); var mainGame = ConstractorUI.MainGame; mainGame.SetActive(true); var gameMenu = ConstractorUI.GameMenu; gameMenu.SetActive(true); }