示例#1
0
    // 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;
    }
示例#2
0
 void Start()
 {
     nightAmbienceSound = GetComponent <AudioSource>();
     sunTimer           = GetComponentInParent <SunTimeOfDay>();
     AudioManager.instance.PlaySound(SoundType.NightAmbience, gameObject, false);
 }