// Start is called before the first frame update void Start() { //Find Sun Light[] lights = FindObjectsOfType <Light>(); foreach (Light l in lights) { if (l.GetComponent <SunTimeOfDay>()) { sunTime = l.GetComponent <SunTimeOfDay>(); } } sunTime.SetTimeOfDayTo(0); LevelStart(); MenuManager.OnLevelStart += LevelStart; }
void Start() { nightAmbienceSound = GetComponent <AudioSource>(); sunTimer = GetComponentInParent <SunTimeOfDay>(); AudioManager.instance.PlaySound(SoundType.NightAmbience, gameObject, false); }