// Update is called once per frame void Update() { if (Application.targetFrameRate != target) { Application.targetFrameRate = target; } if (nextScene == "Game") { if (audioplayer != null) { StartCoroutine(AudioPlayer.FadeOut(audioplayer, 2.0f)); audioplayer = null; } } }
public void StartGame() { starting = true; // set player join info foreach (SelectionInput input in inputs) { JoinInfo info = new JoinInfo(); Debug.Log(input.characterIndex); info.characterType = input.characterIndex; info.team = input.teamIndex; info.isAI = !input.connected; PlayerManager.playerQueue.Add(info); } player.PlaySFX(highAudio); StartCoroutine(player.FadeOut(1.5f)); StartCoroutine(LoadScene("Loading")); gameObject.GetComponent <Back>().Unbind(); //SceneManager.LoadScene("Game"); }