using System.Collections; using System.Collections.Generic; using UnityEngine; public class DayNightLightChanger : MonoBehaviour { public List DayActiveObjects = new(); public List NightActiveObjects = new(); void Start() { GameProcedureManager.Instance.OnNight += OnNight; GameProcedureManager.Instance.OnDay += OnDay; } public void OnNight() { DayActiveObjects.ForEach(o=>o.SetActive(false)); NightActiveObjects.ForEach(o=>o.SetActive(true)); } public void OnDay() { DayActiveObjects.ForEach(o=>o.SetActive(true)); NightActiveObjects.ForEach(o=>o.SetActive(false)); } }