void Start() { Instance = this; transformSet = new TransformSet(); HeatCalculator = new HeatCalculator() { Type = HeatTypes.None }; int res = 513; RockMap = new float[res, res]; SoilMap = new float[res, res]; WaterMap = new float[res, res]; SurfaceMap = new int[res, res]; HumidityMap = new float[res, res]; LoadMaps(); SimulationInterval = 5000; EditConfigs = new EditConfigs(); UpdateTransformMaps(); UpdateHeatCalculatorMaps(); UpdateView(true); }
public EditConfigs GetConfigs() { EditConfigs configs = new EditConfigs(); configs.BrushSize = (int)sliderBrushSize.value; if (dropdownSurface.value > 0) { configs.SurfacePaintMode = (SurfaceType)(dropdownSurface.value - 1); } return configs; }
public void SetConfigs(EditConfigs configs) { sliderBrushSize.value = (float)configs.BrushSize; if (configs.SurfacePaintMode == null) { dropdownSurface.value = 0; } else { dropdownSurface.value = (int)(configs.SurfacePaintMode + 1); } }
public void SetEditConfigs(EditConfigs configs) { TerrainControl.Instance.EditConfigs = configs; }