private static void Postfix(LightShaftTod __instance) { if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady) { GameLights.UpdateLightshafts(); } }
public static void SetupLights() { if (config.ready) { //Debug.Log("[ambient-lights] Setting up " + config.data.emitters.Count + " light sources for scene."); ALUtils.Log("Setting up " + config.data.emitters.Count + " light sources for scene.", false, true); foreach (AmbEmitter emitter in config.data.emitters) { //Debug.Log("Emitter pos: " + emitter.position); Vector3 newPos = ALUtils.StringToVector3(emitter.position); AmbLight newLight = new AmbLight(newPos, emitter.orientation, emitter.size, emitter.cover); lightList.Add(newLight); } lightsInit = true; MaybeUpdateLightsToPeriod(true); if (!GameLights.gameLightsReady) { GameLights.AddGameLights(); } } else { //Debug.Log("[ambient-lights] ERROR: Config isn't ready or not present."); ALUtils.Log("ERROR: Config isn't ready or not present.", false, true); } }
private static void Postfix(DarkLightingManager __instance) { if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady) { GameLights.UpdateWindows(); } }
private static void Postfix(InteriorLightingManager __instance) { if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady) { //AmbientLights.UpdateGameLights(); GameLights.UpdateLights(); } }
private static void Postfix(InteriorLightingManager __instance) { if (GameLights.mngr != null) { GameLights.mngr = __instance; GameLights.AddGameLights(); } }
public static void UpdateGameLights(bool isDarkMngr = false) { /*foreach (AmbLight aLight in lightList) * { * aLight.UpdateGameLights(); * }*/ if (!isDarkMngr) { GameLights.UpdateLights(); } }
private void MergeConfigs() { if (data != null) { if (periodsConfig != null) { data.periods = periodsConfig; } if (weathersConfig != null) { data.weathers = weathersConfig; } ready = true; if (!GameLights.gameLightsReady) { GameLights.AddGameLights(); } } }
private static void Postfix(DarkLightingManager __instance) { GameLights.darkMngr = __instance; GameLights.AddGameLights(); }