示例#1
0
 public void StartGame()
 {
     jukebox.GetComponent <AudioSource>().Play();
     cannon.StartRound();
     timer.StartRound();
     gameObject.SetActive(false);
 }
示例#2
0
    // 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;
    }
示例#3
0
    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;
    }