/// <summary> /// Changes the current level. /// </summary> /// <param name="scene">Level to load.</param> public static void SetCurrentScene(Scene scene) { LoadingScreen.SetProgress("Unloading current level..."); if (CurrentScene != null) { CurrentScene.Unload(); CurrentScene = null; } CurrentScene = scene; CurrentScene.Load(); LoadingScreen.SetProgress("Finalizing..."); GameEngine.RequestGC(); LoadingScreen.Finished(); }