示例#1
0
 // 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();
     }
 }
示例#2
0
        // 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();
            }
        }
示例#3
0
        // 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();
            }
        }