Beispiel #1
0
    // Update is called once per frame
    public override IEnumerator StartInteraction()
    {
        float time;

        GameControl.control.Freeze();
        yield return(StartCoroutine(jukebox.PauseOut(0.4f)));

        currentSong = jukebox.CurrentSong();
        time        = jukebox.CurrentTime();
        jukebox.StopSong();
        jukebox.PlaySong(songName);
        yield return(StartCoroutine(jukebox.FadeIn(0.01f)));

        if (hasDialogue)
        {
            yield return(StartCoroutine(talkCanvas.GetComponent <TalkController>().StartDialogueSolo(dialogue)));
        }
        else
        {
            yield return(new WaitForSeconds(waitTime));
        }
        yield return(StartCoroutine(jukebox.PauseOut(0.05f)));

        jukebox.StopSong();
        jukebox.PlaySong(currentSong);
        StartCoroutine(jukebox.FadeIn(0.4f));
    }