private void RemoveTransitions() { foreach (GameObject obj in GameObject.FindObjectsOfType <GameObject>()) { TransitionPoint gate = obj.GetComponent <TransitionPoint>(); if (gate != null) { GameObject.Destroy(gate); GateSnap snap = obj.GetComponent <GateSnap>(); BoxCollider2D box = obj.GetComponent <BoxCollider2D>(); if (snap != null) { GameObject.Destroy(snap); } if (box != null) { box.isTrigger = false; } obj.layer = 8; if (obj.name.Contains("door")) { obj.SetActive(false); } } } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Begin Scene Transition //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void TransitionGame(TransitionPhase eTransition) { m_ePreviousScene = m_eCurrentScene; m_eCurrentScene = eTransition; // Due to the way this script has been made, we actually start with the opposite of what we intended. We fade out that scene THEN Show (Fadein) the scene we actually intended m_eTransitionPhase = m_ePreviousScene; m_eTransitionPoint = TransitionPoint.FADEOUT_START; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Begin Scene Transition //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void UpdateSceneFadeout() { // If the scene has finished fading out, move on to next pahse if (CurrentSceneFadeEffect.IsCompleted) { CurrentSceneObject.SetActive(false); m_eTransitionPoint = TransitionPoint.BACKGROUND_TRANSITION_START; } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Update Background Landscape Transition //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void UpdateBackgroundTransition() { // If the background transition has been completed, reverse the transition phase to be the opposite. This other scene will now be fading in if (m_rBackgroundLandscapeTransitionEffect.IsCompleted) { m_eTransitionPoint = TransitionPoint.FADEIN_START; m_eTransitionPhase = m_eCurrentScene; // (m_eTransitionPhase == TransitionPhase.SHOWSTART ? TransitionPhase.SHOWGAME : TransitionPhase.SHOWSTART); } }
private static IEnumerator Ok(On.HeroController.orig_EnterScene orig, HeroController self, TransitionPoint entergate, float delaybeforeenter) { // Fix transition state, etc. TransitionPoint gate2 = UnityEngine.Object.Instantiate(entergate); // Invalid gate name causes it not to put you wherever. gate2.name = "no"; yield return(orig(self, gate2, delaybeforeenter)); }
public void StartGame() { TransitionPoint transitionPoint = new TransitionPoint(); transitionPoint.newSceneName = "Level01"; transitionPoint.transitionDestinationTag = SceneTransitionDestination.DestinationTag.A; transitionPoint.transitionType = TransitionPoint.TransitionType.DifferentZone; SceneController.TransitionToScene(transitionPoint); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: On Background Landscape Transition //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void OnBackgroundTransitionStart() { // Remember that at the moment, these are actually reversed. This is to save code. So SHOWGAME actually means to ShowTitle Screen at this point. if (m_eCurrentScene == TransitionPhase.SHOWGAME) { m_rBackgroundLandscapeTransitionEffect.InitiateGameSceneTransition(); } else { m_rBackgroundLandscapeTransitionEffect.InitiateStartMenuTransition(); } m_eTransitionPoint = TransitionPoint.BACKGROUND_TRANSITION; }
public void Teleport(GameObject transitioningGameObject, TransitionPoint destination) { Debug.Log("teleporting"); PlayerManager.instance.switchTransition(); transitioningGameObject.transform.position = destination.transform.position; SpawnEnemy spawn = transform.GetComponent <SpawnEnemy>(); if (spawn != null) { spawn.enabled = true; } Destroy(this); }
public void TransitionToDestination(TransitionPoint transitionPoint) { switch (transitionPoint.transitionType) { case TransitionPoint.TransitionType.SameScene: StartCoroutine(Transition(SceneManager.GetActiveScene().name, transitionPoint.destinationTag)); break; case TransitionPoint.TransitionType.DifferentScene: StartCoroutine(Transition(transitionPoint.sceneName, transitionPoint.destinationTag)); break; } }
void UpdateEntranceToPointToExit() { lastExit = previousArea.GetTransitionWithName(TransitionPoint.lastEntered); lastEntrance = currentArea.GetTransitionWithName(lastExit.DestinationDoorName); GameObject transitionObject = GameObject.Find(lastEntrance.DoorName); TransitionPoint transition = transitionObject.GetComponent <TransitionPoint>(); transition.targetScene = lastExit.DestinationSceneName; transition.entryPoint = lastExit.DoorName; }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { TransitionPoint transitionPoint = new TransitionPoint { newSceneName = "MainMenu", requiresInventoryCheck = false }; SceneController.GameFinished = true; SceneController.TransitionToScene(transitionPoint); } }
IEnumerator FixTransition(TransitionPoint gate, string setScene, string setGate) { for ( ; ;) { if (gate == null) { break; } gate.targetScene = setScene; gate.entryPoint = setGate; yield return(new WaitForEndOfFrame()); } }
/// <summary> /// Callback method for the TransitionPoint#OnTriggerEnter2D method. /// If we go through a transition while being paused, we can only let the transition occur if we /// unpause first and then let the original method continue. /// </summary> /// <param name="orig">The original method.</param> /// <param name="self">The TransitionPoint instance.</param> /// <param name="obj">The collider that enters the trigger.</param> private void TransitionPointOnOnTriggerEnter2D( On.TransitionPoint.orig_OnTriggerEnter2D orig, TransitionPoint self, Collider2D obj ) { // Skip this if the transition point is a door, since it isn't a enter-and-teleport transition, // but requires input to transition, so it can't happen in the pause menu if (!self.isADoor) { ImmediateUnpauseIfPaused(); } // Execute original method orig(self, obj); }
protected IEnumerator TransitionInternal(string newSceneName, SceneTransitionDestination.DestinationTag tag) { if (newSceneName != SceneManager.GetActiveScene().name) { yield return(SceneManager.LoadSceneAsync(newSceneName)); } PlayerMovement player = FindPlayerInput(); SceneTransitionDestination sceneTransitionDestination = GetDestination(tag); TransitionPoint transitionPoint = sceneTransitionDestination.gameObject.GetComponent <TransitionPoint>(); if (transitionPoint != null) { transitionPoint.canTransition = false; } player.transform.position = sceneTransitionDestination.transform.position; yield break; }
/** * If we go through a transition while being based, we can only let the transition * occur if we unpause first and then let the original method continue */ private void TransitionPointOnOnTriggerEnter2D( On.TransitionPoint.orig_OnTriggerEnter2D orig, TransitionPoint self, Collider2D obj ) { // Unpause if paused if (UIManager.instance != null) { if (UIManager.instance.uiState.Equals(UIState.PAUSED)) { UIManager.instance.TogglePauseGame(); } } // Execute original method orig(self, obj); }
// Draw a dotted line between the nodes in the editor private void OnDrawGizmos() { if (nodes.Count > 0) { #if (UNITY_EDITOR) Handles.color = Color.white; for (int i = 0; i < nodes.Count - 1; i++) { Handles.DrawDottedLine(nodes[i].position, nodes[i + 1].position, 3.0f); } Handles.color = Color.red; for (int i = 0; i < nodes.Count; i++) { TransitionPoint tp = nodes[i].gameObject.GetComponent <TransitionPoint>(); if (tp.targetPoint != null) { Handles.DrawDottedLine(nodes[i].position, nodes[nodes.IndexOf(tp.targetPoint.transform)].position, 3.0f); } } #endif } }
void RandomizeTransitionsInCurrentScene() { foreach (var t in GameObject.FindObjectsOfType <TransitionPoint>()) { Dev.Log("Found " + t.name + " with transiton to " + t.targetScene + " with entry point " + t.entryPoint); } foreach (var connection in currentArea.scene.Transitions) { Dev.Log("Randomizing " + connection.DoorName); GameObject transitionObject = GameObject.Find(connection.DoorName); if (transitionObject == null) { Dev.Log("transitionObject is null! " + connection.DoorName); continue; } Dev.Log("Found? " + transitionObject); Dev.Log("Found? " + transitionObject.name); TransitionPoint transition = transitionObject.GetComponent <TransitionPoint>(); if (transition == null) { Dev.Log("TransitionPoint is null! " + connection.DoorName); continue; } Dev.Log("Transition has " + transition.entryPoint); Dev.Log("Transition goes to " + transition.targetScene); var areas = World.Map.Values.ToList(); var nextArea = areas.GetRandomElementFromList(); int saver = 0; bool selected = false; while (!selected) { bool hasMatchingDoor = false; string oldEntryPoint = transition.entryPoint; if (nextArea.connections.Count > 1) { if (transition.entryPoint.Contains("right")) { var selectedTransitions = nextArea.GetTransitionsNamesContaining("right"); if (selectedTransitions.Count > 0) { hasMatchingDoor = true; var chosen = selectedTransitions.GetRandomElementFromList(); transition.entryPoint = chosen; } } else if (transition.entryPoint.Contains("left")) { var selectedTransitions = nextArea.GetTransitionsNamesContaining("left"); if (selectedTransitions.Count > 0) { hasMatchingDoor = true; var chosen = selectedTransitions.GetRandomElementFromList(); transition.entryPoint = chosen; } } else if (transition.entryPoint.Contains("top")) { var selectedTransitions = nextArea.GetTransitionsNamesContaining("top"); if (selectedTransitions.Count > 0) { hasMatchingDoor = true; var chosen = selectedTransitions.GetRandomElementFromList(); transition.entryPoint = chosen; } } else if (transition.entryPoint.Contains("bot")) { var selectedTransitions = nextArea.GetTransitionsNamesContaining("bot"); if (selectedTransitions.Count > 0) { hasMatchingDoor = true; var chosen = selectedTransitions.GetRandomElementFromList(); transition.entryPoint = chosen; } } else if (transition.entryPoint.Contains("door")) { var selectedTransitions = nextArea.GetTransitionsNamesContaining("door"); if (selectedTransitions.Count > 0) { hasMatchingDoor = true; var chosen = selectedTransitions.GetRandomElementFromList(); transition.entryPoint = chosen; } } else { hasMatchingDoor = false; } } if (hasMatchingDoor) { Dev.Log(oldEntryPoint + " entry point changed to " + transition.entryPoint); selected = true; } else { nextArea = areas.GetRandomElementFromList(); } if (saver > 1000) { Dev.LogError("Saver triggered!"); break; } saver++; } Dev.Log(transition.targetScene + " transition changed to " + nextArea.scene.SceneName); transition.targetScene = nextArea.scene.SceneName; IEnumerator fixer = FixTransition(transition, nextArea.scene.SceneName, transition.entryPoint); transitionFixers.Add(fixer); GameManager.instance.StartCoroutine(fixer); } }
public static void TransitionToScene(TransitionPoint transitionPoint) { Instance.StartCoroutine(Instance.Transition(transitionPoint.GetSceneName(), transitionPoint.birthPoint)); }
public void TransitionToScene(TransitionPoint transitionPoint) { StartCoroutine(Transition(transitionPoint.newSceneName, CellTransitionDestination.DestinationTag.A)); }
private static void ProcessRestrictions() { if (AreaRando.Instance.Settings.AllBosses || AreaRando.Instance.Settings.AllCharms || AreaRando.Instance.Settings.AllSkills) { // Close the door and get rid of Quirrel Ref.PD.openedBlackEggDoor = false; Ref.PD.quirrelLeftEggTemple = true; // Prevent the game from opening the door GameObject door = GameObject.Find("Final Boss Door"); PlayMakerFSM doorFSM = FSMUtility.LocateFSM(door, "Control"); doorFSM.SetState("Idle"); // The door is cosmetic, gotta get rid of the actual TransitionPoint too TransitionPoint doorTransitionPoint = door.GetComponentInChildren <TransitionPoint>(true); doorTransitionPoint.gameObject.SetActive(false); // Make Hornet appear GameObject hornet = GameObject.Find("Hornet Black Egg NPC"); hornet.SetActive(true); FsmState activeCheck = FSMUtility.LocateFSM(hornet, "Conversation Control").GetState("Active?"); activeCheck.RemoveActionsOfType <IntCompare>(); activeCheck.RemoveActionsOfType <PlayerDataBoolTest>(); // Reset Hornet dialog to default LanguageStringManager.ResetString(HORNET_SHEET, HORNET_DOOR_KEY); // Check dreamers if (!Ref.PD.lurienDefeated || !Ref.PD.monomonDefeated || !Ref.PD.hegemolDefeated) { LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, "What kind of idiot comes here without even killing the dreamers?"); return; } // Check all charms if (AreaRando.Instance.Settings.AllCharms) { Ref.PD.CountCharms(); if (Ref.PD.charmsOwned < 40) { LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, "What are you doing here? Go get the rest of the charms."); return; } if (Ref.PD.royalCharmState < 3) { LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, "Nice try, but half of a charm doesn't count. Go get the rest of the kingsoul."); return; } } // Check all skills if (AreaRando.Instance.Settings.AllSkills) { List <string> missingSkills = new List <string>(); foreach (KeyValuePair <string, string> kvp in Skills) { if (!Ref.PD.GetBool(kvp.Key)) { missingSkills.Add(kvp.Value); } } // These aren't as easy to check in a loop, so I'm just gonna check them manually if (Ref.PD.fireballLevel == 0) { missingSkills.Add("Vengeful Spirit"); } if (Ref.PD.fireballLevel < 2) { missingSkills.Add("Shade Soul"); } if (Ref.PD.quakeLevel == 0) { missingSkills.Add("Desolate Dive"); } if (Ref.PD.quakeLevel < 2) { missingSkills.Add("Descending Dark"); } if (Ref.PD.screamLevel == 0) { missingSkills.Add("Howling Wraiths"); } if (Ref.PD.screamLevel < 2) { missingSkills.Add("Abyss Shriek"); } if (missingSkills.Count > 0) { string hornetStr = "You are still missing "; for (int i = 0; i < missingSkills.Count; i++) { if (i != 0 && i == missingSkills.Count - 1) { hornetStr += " and "; } hornetStr += missingSkills[i]; if (i != missingSkills.Count - 1) { hornetStr += ", "; } } hornetStr += "."; LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, hornetStr); return; } } // Check all bosses if (AreaRando.Instance.Settings.AllBosses) { List <string> missingBosses = new List <string>(); foreach (KeyValuePair <string, string> kvp in Bosses) { if (!Ref.PD.GetBool(kvp.Key)) { missingBosses.Add(kvp.Value); } } // CG2 has no bool if (Ref.PD.killsMegaBeamMiner > 0) { missingBosses.Add("Crystal Guardian 2"); } if (missingBosses.Count > 0) { if (missingBosses.Count >= 10) { LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, $"You haven't killed {missingBosses.Count} bosses."); return; } string hornetStr = "You haven't killed "; for (int i = 0; i < missingBosses.Count; i++) { if (i != 0 && i == missingBosses.Count - 1) { hornetStr += " and "; } hornetStr += missingBosses[i]; if (i != missingBosses.Count - 1) { hornetStr += ", "; } } hornetStr += "."; LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, hornetStr); return; } if (Ref.PD.royalCharmState != 4) { LanguageStringManager.SetString(HORNET_SHEET, HORNET_DOOR_KEY, "You chose all bosses, go get void heart ya dip."); return; } } // All checks passed, time to open up Ref.PD.openedBlackEggDoor = true; doorFSM.SetState("Opened"); doorTransitionPoint.gameObject.SetActive(true); } }
public static void TransitionToScene(TransitionPoint transitionPoint) { Instance.StartCoroutine(Instance.Transition(transitionPoint.newSceneName, transitionPoint.resetInputValuesOnTransition, transitionPoint.transitionDestinationTag, transitionPoint.transitionType)); }
public void TransitionToScene(TransitionPoint transitionPoint) { SceneController.TransitionToScene(transitionPoint); }
public IEnumerator EnterSandbox() { //find a source transition string currentSceneTransition = GameObject.FindObjectOfType <TransitionPoint>().gameObject.name; string currentScene = GameManager.instance.sceneName; //update the last entered TransitionPoint.lastEntered = currentSceneTransition; //place us in sly's storeroom GameManager.instance.BeginSceneTransition(new GameManager.SceneLoadInfo { SceneName = "Room_Sly_Storeroom", EntryGateName = "top1", HeroLeaveDirection = new GlobalEnums.GatePosition?(GlobalEnums.GatePosition.door), EntryDelay = 1f, WaitForSceneTransitionCameraFade = true, Visualization = GameManager.SceneLoadVisualizations.Default, AlwaysUnloadUnusedAssets = false }); while (GameObject.Find("Sly Basement NPC") == null) { yield return(new WaitForEndOfFrame()); } foreach (var roof in GameObject.FindObjectsOfType <Roof>()) { GameObject.Destroy(roof); } //remove the roofs GameObject.Destroy(GameObject.Find("Chunk 0 0").GetComponents <EdgeCollider2D>()[1]); GameObject.Destroy(GameObject.Find("Chunk 0 1").GetComponents <EdgeCollider2D>()[1]); GameObject.Destroy(GameObject.Find("wall collider")); GameObject.Destroy(GameObject.Find("Walk Area")); GameObject.Destroy(GameObject.Find("Shop Menu")); GameObject.Destroy(GameObject.Find("Sly Basement NPC")); GameObject.Destroy(GameObject.Find("Roof Collider (2)")); GameObject.Destroy(GameObject.Find("Roof Collider (1)")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0008_18")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0004_21")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0003_22")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0027_1 (3)")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0009_17 (3)")); GameObject.Destroy(GameObject.Find("Sly_Storeroom_0027_1 (2)")); Scene s = UnityEngine.SceneManagement.SceneManager.GetSceneByName("Room_Sly_Storeroom"); GameObject.Destroy(s.FindGameObject("Shop Item ShellFrag Sly1(Clone)")); GameObject.Destroy(s.FindGameObject("Shop Item VesselFrag Sly1")); GameObject.Destroy(s.FindGameObject("Shop Item Ch GeoGatherer(Clone)")); GameObject.Destroy(s.FindGameObject("Shop Item Ch Wayward Compass(Clone)")); GameObject.Destroy(s.FindGameObject("Shop Item Lantern(Clone)")); GameObject.Destroy(s.FindGameObject("Shop Item White Key(Clone)")); GameObject.Destroy(s.FindGameObject("Shop Item VesselFrag Sly1")); GameObject.Destroy(s.FindGameObject("Shop Item VesselFrag Sly1(Clone)")); GameObject.Destroy(s.FindGameObject("Dream Dialogue")); foreach (var roof in GameObject.FindObjectsOfType <SpriteRenderer>()) { if (roof.transform.position.x < 80f && roof.transform.position.x > -1f) { if (roof.transform.position.y > 5f) { GameObject.Destroy(roof.gameObject); } else if (roof.transform.position.z < -2f) { GameObject.Destroy(roof.gameObject); } } } foreach (var roof in GameObject.FindObjectsOfType <MeshRenderer>()) { GameObject.Destroy(roof); } SpawnLevelPart("Platform_Block", new Vector3(75f, 10f, 0f)); SpawnLevelPart("Platform_Long", new Vector3(50f, 7.5f, 0f)); SpawnLevelPart("Platform_Block", new Vector3(25f, 5f, 0f)); //Good ground spawn: 64, 6, 0 //TODO: Make the exit back to the previous scene work TransitionPoint exit = GameObject.Find("door1").GetComponent <TransitionPoint>(); exit.targetScene = currentScene; exit.entryPoint = currentSceneTransition; }
private static IEnumerator DelayForNailCharge(On.HeroController.orig_EnterScene orig, HeroController self, TransitionPoint enterGate, float delayBeforeEnter) { if (self.playerData.hasNailArt) { if (self.GetCState("nailCharging") || self.GetCState("attacking")) { // 0.565 seconds are vanilla, adding a bit more to make cyclone dropping into Deepnest_01b viable on good pcs delayBeforeEnter += 0.7f; } } yield return(orig(self, enterGate, delayBeforeEnter)); }
private void Awake() { m_Animator = GetComponent <Animator>(); m_TransitionPoint = GetComponent <TransitionPoint>(); //m_EnterDoorEffect = VFXController.StringToHash(enterDoorEffect); }
public static void Teleport(TransitionPoint transitionPoint) { Transform destinationTransform = Instance.GetDestination(transitionPoint.transitionDestinationTag).transform; Instance.StartCoroutine(Instance.Transition(transitionPoint.transitioningGameObject, true, transitionPoint.resetInputValuesOnTransition, destinationTransform.position, true)); }
private void Move() { if (Time.timeScale == 0) { return; } TransitionPoint tp = rail.nodes[currentNodeIndex].gameObject.GetComponent <TransitionPoint>(); RailTrigger[] rts = tp.getRailTriggers(); if (rts.Length > 0) { foreach (RailTrigger rt in rts) { if (!rt.activated) { if (rt.onEnter) { rt.Activate(); } } } } // Does this TP have requirements before we can move? if (!tp.metRequirements()) { return; // If we haven't met the requirements, do not move } if (Camera.main.GetComponent <CameraCollider>().EnemiesNearby()) { lastEnemyTime = Time.time; return; // Don't do anything if enemies nearby } else { if ((Time.time - lastEnemyTime) < ENEMY_KILLED_DELAY) { return; } } int targetIndex = (tp.targetPoint != null) ? tp.targetPoint.gameObject.GetComponent <TransitionPoint>().index : currentNodeIndex + 1; if (targetIndex >= rail.nodes.Count) // We are on the last node // We've reached the end { isCompleted = true; return; } Vector3 targetPosition = rail.nodes[targetIndex].position; Quaternion targetRotation = rail.nodes[targetIndex].rotation; // We have met all requirements, we can move // The magnitude of the next TP and the current one float mP = (targetPosition - rail.nodes[currentNodeIndex].position).magnitude; // The point on the segment that we are on, based on the speed of the TP float sP = (Time.deltaTime * 1 / mP) * tp.transitionSpeed; transitionPosition += sP; float mQ = Quaternion.Angle(targetRotation, rail.nodes[currentNodeIndex].rotation); float sQ = (Time.deltaTime * 1 / mQ) * (tp.transitionSpeed * 10); transitionQuaternion += sQ; if ((transitionPosition >= 1 && transitionQuaternion >= 1) || (transitionPosition == Mathf.Infinity && transitionQuaternion == Mathf.Infinity)) // If we are moving forwards and reached our destination { if (rts.Length > 0) { foreach (RailTrigger rt in rts) { if (!rt.activated) { if (!rt.onEnter) { rt.Activate(); } } } } transitionPosition = 0; // set the point on the line back to the beginning transitionQuaternion = 0; if (tp.targetPoint == null) { currentNodeIndex++; // Just go to the next segment } else { currentNodeIndex = tp.targetPoint.gameObject.GetComponent <TransitionPoint>().index; } if (currentNodeIndex == rail.nodes.Count) // If we are on the last node { if (tp.targetPoint == null) { isCompleted = true; return; } else { currentNodeIndex = tp.targetPoint.gameObject.GetComponent <TransitionPoint>().index; } } } // Move us transform.position = rail.PositionOnRail(currentNodeIndex, targetIndex, transitionPosition, mode); transform.rotation = rail.Orientation(currentNodeIndex, targetIndex, transitionQuaternion); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: On Fadeout Begin //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void OnFadeoutBegin() { // Start Fadeout of scene and move on to the "Fadeout Wait" phase CurrentSceneFadeEffect.InitiateFadeOut(); m_eTransitionPoint = TransitionPoint.FADEOUT; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: On Scene Fade in Begin //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void OnFadeinBegin() { CurrentSceneObject.SetActive(true); CurrentSceneFadeEffect.InitiateFadeIn(); m_eTransitionPoint = TransitionPoint.FADEIN; }