//Should be called in update for timing to be correct void transitionTo(roomVisualsHolder newHolder) { if (themeChanged != null) { themeChanged(newHolder); } lightDeltas.Clear(); matDeltas.Clear(); foreach (roomLightConfiguration lightConfig in newHolder.lightConfigurations) { LightClass sampleLightClass = FindObjectsOfType <LightClass>().Where(light => light.classification == lightConfig.targetClassification).FirstOrDefault(); if (sampleLightClass != null) { lightDeltas.Add(new LightChangeDeltas(lightConfig, sampleLightClass.light)); } } foreach (roomMaterialConfiguration matConfig in newHolder.materialConfigurations) { matDeltas.Add(new MaterialChangeDeltas(matConfig)); } //Changing will start on next update() stopTime = Time.time + completionTime; }
public WorldSettings() { Lighting = new LightClass(); RenderMode = 2; RenderSky = false; }