/// <summary> /// Sets the UI elements in the menu. /// </summary> public void Start() { SceneInteraction.changeContourLines(TerrainObject.showContourLines); this.loadingCircle = GameObject.Find("LoadingCircle"); this.loadingCircle.SetActive(false); Slider seedSlider = GameObject.Find("SeedSlider").GetComponent <Slider>(); seedSlider.value = TerrainObject.seed; Slider roughSlider = GameObject.Find("RoughnessSlider").GetComponent <Slider>(); roughSlider.value = TerrainObject.rough; Toggle showContourLinesToggle = GameObject.Find("ShowContourLinesToggleMenu") .GetComponent <Toggle>(); showContourLinesToggle.isOn = TerrainObject.showContourLines; }
/// <summary> /// Corresponds the register of changeContourLines() as an event listener /// </summary> /// <param name="showContourLines"> /// True, if contour lines should be presented, otherwise false. /// </param> public void OnContourLinesChanged(bool showContourLines) { SceneInteraction.changeContourLines(showContourLines); }