Beispiel #1
0
 public void Next()
 {
     SoundManager.PlayClick();
     if (index < paragraphs.Length)
     {
         if (display.Play(GameManager.Clean(paragraphs[index])))
         {
             index++;
         }
     }
     else
     {
         if (display.Play(GameManager.Clean(paragraphs [index - 1])))
         {
             foreach (GameObject go in panelsToToggle)
             {
                 go.SetActive(go.activeSelf ? false : true);
             }
             gameObject.SetActive(false);
             //Not really working :
             index = 0;
             display.Clear();
         }
     }
 }
Beispiel #2
0
    IEnumerator OpeningRoutine()
    {
        ShowFeedbackWindow();
        var feedStr = StartFight(dog1, dog2);

        display.Play(feedStr);
        yield return(new WaitForSeconds(2f + feedStr.Length * 0.03f));

        doneShouting = false;
        StartCoroutine(PickAfterSeconds());
        yield return(new WaitUntil(() => doneShouting));

        feedStr = AggressionRound();
        display.Play(feedStr);

        yield return(new WaitForSeconds(1f));

        sound.PlayCheer();

        yield return(new WaitForSeconds(1.5f));

        if (feedStr.Contains("scared puppy"))
        {
            sound.PlayWhine();
        }
        yield return(new WaitForSeconds(feedStr.Length * 0.03f));

        doneShouting = false;
        StartCoroutine(PickAfterSeconds());
        yield return(new WaitUntil(() => doneShouting));

        StartCoroutine(RoundRoutine());
    }