Exemple #1
0
 internal static void Init()
 {
     if (!Instance)
     {
         Instance = new GameObject().AddComponent <Bloominator3000>();
     }
     Plugin.bloomIntensity = Plugin.initialBloomIntensity;
     Instance?._mainEffectParams?.SetPrivateField("_bloomIntensity", Plugin.bloomIntensity);
 }
Exemple #2
0
        public void OnActiveSceneChanged(Scene prevScene, Scene nextScene)
        {
            if (nextScene.name == "GameCore" && bloomOnMissEnabled)
            {
                Bloominator3000.Init();
                return;
            }

            Bloominator3000.Instance?.Cleanup();
            var preset     = GeneratePreset();
            var mainEffect = Resources.FindObjectsOfTypeAll <MainEffect>().FirstOrDefault();

            mainEffect?.GetPrivateField <MainEffectParams>("_mainEffectParams")?.InitFromPreset(preset);
        }