示例#1
0
    public IEnumerator ShowGameOver()
    {
        isPlaying        = false;
        audioPlayer.clip = gameoverMusic;
        audioPlayer.Play();
        yield return(new WaitForSeconds(1f));

        audioPlayer.PlayOneShot(gameoverJingle, AudioOptionController.GetJinglesVolume());
        DisplayGameOver();
        DisplayStats();
        yield return(new WaitForSeconds(0.3f));

        DisplayScore();
        yield return(new WaitForSeconds(0.3f));

        DisplayTZK();
        yield return(new WaitForSeconds(0.3f));

        DisplayBDS();
        yield return(new WaitForSeconds(0.3f));

        DisplayTS();
        yield return(new WaitForSeconds(0.3f));

        DisplayHighScore();
        yield return(new WaitForSeconds(0.3f));

        DisplayTryAgain();
    }
示例#2
0
 public void Event(string text, AudioClip jingle = null)
 {
     if (isPlaying)
     {
         StartCoroutine(ShowEvent(text));
         if (jingle != null)
         {
             audioPlayer.PlayOneShot(jingle, AudioOptionController.GetJinglesVolume());
         }
     }
 }