// instantiate a transition prefab and fade on/off public static void PlayTransition(TransitionFader transitionPrefab) { if (transitionPrefab != null) { TransitionFader instance = Instantiate(transitionPrefab, Vector3.zero, Quaternion.identity); instance.Play(); } }
// TODO: [REMOVE] - verify that is unused // instantiate a transition prefab and fade on/off, alter the text and fade on/off public static void PlayTransition(TransitionFader transitionPrefab, string nextLevelName) { if (transitionPrefab != null) { transitionPrefab.GetComponentInChildren <Text>().text = nextLevelName; TransitionFader instance = Instantiate(transitionPrefab, Vector3.zero, Quaternion.identity); instance.Play(); } }
// instantiate a transition prefab, alter the text and fade on/off public static void PlayTransition(TransitionFader transitionPrefab, int nextLevelNumber) { if (transitionPrefab != null) { //transitionPrefab.GetComponentInChildren<Text>().text = "LEVEL " + nextLevelNumber; TransitionFader instance = Instantiate(transitionPrefab, Vector3.zero, Quaternion.identity); instance.Play(); } }