コード例 #1
0
        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);
        }
コード例 #2
0
        public EditConfigs GetConfigs()
        {
            EditConfigs configs = new EditConfigs();
            configs.BrushSize = (int)sliderBrushSize.value;

            if (dropdownSurface.value > 0)
            {
                configs.SurfacePaintMode = (SurfaceType)(dropdownSurface.value - 1);
            }

            return configs;
        }
コード例 #3
0
        public void SetConfigs(EditConfigs configs)
        {
            sliderBrushSize.value = (float)configs.BrushSize;

            if (configs.SurfacePaintMode == null)
            {
                dropdownSurface.value = 0;
            }
            else
            {
                dropdownSurface.value = (int)(configs.SurfacePaintMode + 1);
            }
        }
コード例 #4
0
 public void SetEditConfigs(EditConfigs configs)
 {
     TerrainControl.Instance.EditConfigs = configs;
 }