public void LoadCharacterCutscene(int character) { handleMusicScript persistantHandler = GameObject.FindGameObjectsWithTag("MusicHandler")[0].GetComponent <handleMusicScript>(); persistantHandler.setVolume(0.3f, 3f); if (character == 1) { StartCoroutine(loadAsynchronously("Tracy")); } }
private void updateMusic(int levelToLoad) { //If the right musical atmosphere isnt set, we set it handleMusicScript persistantHandler = GameObject.FindGameObjectsWithTag("MusicHandler")[0].GetComponent <handleMusicScript>(); persistantHandler.setVolume(1f, 3f); if (persistantHandler.currentMusicAtmosphere != (levelToLoad - 1) / 20) { persistantHandler.changeMusic((levelToLoad - 1) / 20, 5f); } }