IEnumerator setLevel(EnumLevel level, float time) { GetComponent<AudioSource>().Play(); musicController.QuietDown(time); yield return new WaitForSeconds(time); SceneManager.LoadScene(level.GetName()); }
public void ChangeScene(EnumLevel newLevel) { previousLoadedLevel = Statics.GetFromName(SceneManager.GetActiveScene().name); SceneManager.LoadScene(newLevel.GetName()); }