示例#1
0
 private static void Postfix(LightShaftTod __instance)
 {
     if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady)
     {
         GameLights.UpdateLightshafts();
     }
 }
示例#2
0
        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);
            }
        }
示例#3
0
 private static void Postfix(DarkLightingManager __instance)
 {
     if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady)
     {
         GameLights.UpdateWindows();
     }
 }
示例#4
0
 private static void Postfix(InteriorLightingManager __instance)
 {
     if (!GameManager.m_IsPaused && AmbientLights.config != null && AmbientLights.config.ready && GameLights.gameLightsReady)
     {
         //AmbientLights.UpdateGameLights();
         GameLights.UpdateLights();
     }
 }
示例#5
0
 private static void Postfix(InteriorLightingManager __instance)
 {
     if (GameLights.mngr != null)
     {
         GameLights.mngr = __instance;
         GameLights.AddGameLights();
     }
 }
示例#6
0
        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();
                }
            }
        }
示例#8
0
 private static void Postfix(DarkLightingManager __instance)
 {
     GameLights.darkMngr = __instance;
     GameLights.AddGameLights();
 }