public void LoadScene(string sceneName, string beaconName, bool fade = true) { if (SceneManager.GetActiveScene().name != sceneName && fade) { GlobalController.FadeToBlack(); } this.currentBeaconName = beaconName; GlobalController.playerFollower.DisableFollowing(); GlobalController.playerFollower.DisableSmoothing(); //preserve dash/supercruise state between scenes PlayerController pc = GlobalController.pc; pc.LockInSpace(); //if the wings are open, don't leave a trail if they move around in the level closedJets = false; if (pc.wings != null) { if (pc.wings.HasOpenJets()) { pc.wings.DisableJetTrails(); closedJets = true; } } frozePlayerBeforeTransition = (pc.dashing || pc.supercruise); StartCoroutine(LoadAsync(sceneName)); }
public void LoadScene(string sceneName, Beacon beacon, bool fade = true) { if (fade) { GlobalController.FadeToBlack(); } transition.beacon = beacon; GlobalController.pc.EnterCutscene(); StartCoroutine(LoadAsync(sceneName, fade)); }
public void LoadScene(string sceneName, Beacon beacon, bool fade = true) { if (fade) { GlobalController.FadeToBlack(); } this.currentBeacon = beacon; PlayerController pc = GlobalController.pc; pc.EnterCutscene(); StartCoroutine(LoadAsync(sceneName, fade)); }
public void LoadScene(string sceneName, Beacon beacon, bool fade = true) { if (fade) { GlobalController.FadeToBlack(); } this.currentBeacon = beacon; GlobalController.playerFollower.DisableFollowing(); GlobalController.playerFollower.DisableSmoothing(); //preserve dash/supercruise state between scenes PlayerController pc = GlobalController.pc; pc.LockInSpace(); frozePlayerBeforeTransition = pc.supercruise; StartCoroutine(LoadAsync(sceneName)); }