public void StartGame() { jukebox.GetComponent <AudioSource>().Play(); cannon.StartRound(); timer.StartRound(); gameObject.SetActive(false); }
// Use this for initialization void Start() { jukebox = FindObjectOfType <Jukebox>(); jukebox.GetComponent <AudioSource>().Stop(); timer = FindObjectOfType <Timer>(); cannon = FindObjectOfType <Cannon>(); audioSource = GetComponent <AudioSource>(); audioSource.clip = countdownSound; audioSource.loop = false; }
void EndRound() { audioSource.loop = false; jukebox.GetComponent <AudioSource>().Stop(); audioSource.PlayOneShot(ringingSound); animator.SetBool("Ringing", true); foreach (CountingPanContents pan in pans) { pan.CountLeftOvers(); } Invoke("LoadNextRound", ringingSound.length); FindObjectOfType <Scoreboard>().GetComponent <Scoreboard>().SaveOverallScores(); enabled = false; }