public void UpdateMapTheme(ShopController.MapTheme map) { curMapTheme = map.mapProperties; // Global directionalLight.color = curMapTheme.lightColor; directionalLight.intensity = curMapTheme.lightIntensity; // Game gameSceneryRefs.ApplyMapTheme(curMapTheme); mainMenuSceneryRefs.ApplyMapTheme(curMapTheme); }
public void ApplyMapTheme(MapThemeData theme) { waterRenderer.material = theme.waterMaterial; coastRenderer.material = theme.coastMaterial; // Special stuff. bool useWaterFoam = true; if (theme.specialType == MapThemeData.SpecialType.Volcano) { useWaterFoam = false; } shoreFoam.SetActive(useWaterFoam); lavaBubbles.SetActive(!useWaterFoam); // TODO: Later spawn some props in both game and main menu scenery based on curMapTheme.specialType }