//private DayNightController dayNightController;

        public void Start()
        {
            if (Instance != null)
            {
                Logger.Log("BabboSettings Instance already exists");
            }
            else
            {
                _Instance = this;
            }

            DontDestroyOnLoad(gameObject);

            effects                             = gameObject.AddComponent <GameEffects>();
            mapPresetUpdater                    = gameObject.AddComponent <MapPresetUpdater>();
            window                              = gameObject.AddComponent <Window>();
            PatchData.Instance.window           = window;
            cameraController                    = gameObject.AddComponent <CustomCameraController>();
            PatchData.Instance.cameraController = cameraController;
            presetsManager                      = gameObject.AddComponent <PresetsManager>();
            lightController                     = gameObject.AddComponent <LightController>();
            //dayNightController = DayNightController.Instance;

            effects.checkAndGetEffects();
        }
Beispiel #2
0
        private void Update()
        {
            // if the map changed, needs to find/create new effects
            var newGameStateName = GameStateMachine.Instance.CurrentState.GetType().Name;

            if (newGameStateName != currentGameStateName)
            {
                currentGameStateName = newGameStateName;
                Main.Save();
            }
            effects.checkAndGetEffects();
        }
 private void Update()
 {
     // if the map changed, needs to find/create new effects
     effects.checkAndGetEffects();
 }