private void onZValueChanged(float value) { grid.gridZ = (int)value; sizeZText.text = ((int)value).ToString(); StartCoroutine(grid.DoPostUpdate()); brownBrickButton.transform.GetChild(0).gameObject.SetActive(false); grayBrickButton.transform.GetChild(0).gameObject.SetActive(false); }
void Start() { grid = Grid3D.Instance; gridSizeXSlider.value = grid.gridX; gridSizeZSlider.value = grid.gridZ; gridSizeXSlider.maxValue = grid.max.x; gridSizeZSlider.maxValue = grid.max.y; sizeXText.text = ((int)grid.gridX).ToString(); sizeZText.text = ((int)grid.gridZ).ToString(); StartCoroutine(grid.DoPostUpdate()); }