Exemplo n.º 1
0
 public void StartNarrator(NarratorCallback caller)
 {
     scriptLogic      = caller;
     PlayerAudio.clip = narratorClips[clipNum];
     clipLength       = narratorClips[clipNum].length;
     PlayerAudio.Play();
     timePassed = 0.0f;
     isPlaying  = true;
 }
Exemplo n.º 2
0
    public void StartDialogue(NarratorCallback caller)
    {
        if (scriptLine >= scripts.Length)
        {
            EndDialogue();
            Debug.Log("Should not see this");
        }

        Debug.Log("script line for dialogue: " + scriptLine);
        textContainer.text = scripts[scriptLine];
        textContainer.gameObject.SetActive(true);

        Debug.Log("Here");

        isPlaying        = true;
        PlayerAudio.clip = clips[scriptLine];
        PlayerAudio.Play();

        Debug.Log("Player audio: " + PlayerAudio.isPlaying);

        this.caller = caller;
    }