void EndEnter() { Debug.Log("End Enter"); soundEngine.PlaySoundWithName("Hack"); musicEngine.mixerSnapshots[14].TransitionTo(27); musicEngine.currentMusicSnapshot = musicEngine.mixerSnapshots[14]; Debug.Log("YOU WON"); screenDarken = GameObject.FindGameObjectWithTag("ScreenDarken").GetComponent <FadeOutAndLoadLevel>(); if (screenDarken != null) { Debug.Log("Darkened found"); } screenDarken.FadeAndLoadLevel(); }
IEnumerator StartGame() { yield return(new WaitForSeconds(waitTime)); screenDarken.FadeAndLoadLevel(); }