private void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; _animator = gameObject.GetComponent <Animator>(); }
public static void LoadScene(int sceneBuildIndex) { if (_isLoadingScene) { Debug.Log("[JamSceneManager] Could not load scene " + sceneBuildIndex + " because there was already a scene being loaded"); return; } _isLoadingScene = true; _sceneBuildIndexToLoad = sceneBuildIndex; ScreenFaderController.FadeOut(screenFaderController_OnFadedOut); }