// Update per frame void Update() { // Gametime timer if (f_GameTime > 0) { f_GameTime -= Time.deltaTime; } else { // After game time, there will be an offset before next scene if (f_Offset > 0) { f_Offset -= Time.deltaTime; } else { f_Offset = 0; f_GameTime = 0; // Pass the max score to Data Transfer dt.SetMaxScore(i_MaxScore); for (int i = 0; i < GO_PlayerGO.Length; i++) { if (b_PlayerActiveList[i]) { // + 1 to i because it was coded to take 1 - 4 // Pass the score to data transfer dt.AddScore(new GHScoreInfo(i + 1, GO_PlayerGO[i].transform.GetChild(2).GetComponent <MusicBarLogic>().GetScore())); } } SceneManager.LoadScene(4); } } }