public void initConfig() { //get the index of the song to play songIdx = PlayerPrefs.GetInt(songIdxKey); spawner.setConfig(configList[songIdx].spawnerConfig); configList[songIdx].freqHoldConfig.src = song; freqHold.setConfig(configList[songIdx].freqHoldConfig); progressRing.setLength(song.clip.length); progressRing.src = song; gameOverUI.setToDistort(song); song.Play(); freqHold.activate(); }
public void resume() { // hide 'paused' screen transform.position = new Vector3(0.5f, -0.5f, 0f); selectMode = false; // hide all three buttons resumeBtn.gameObject.SetActive(false); retryBtn.gameObject.SetActive(false); menuBtn.gameObject.SetActive(false); // resume everything else //toDistort.Play(); AudioListener.pause = false; FreqHold freqHold = GameObject.Find("FreqHold").GetComponent <FreqHold>(); freqHold.activate(); PlayerScript playerScript = GameObject.Find("Player").GetComponent <PlayerScript>(); playerScript.SendMessage("Resume"); }