Example #1
0
 public override IEnumerator StartInteraction()
 {
     if (!jukebox.IsPlaying())
     {
         jukebox.ResumeSongBeginning();
         jukebox.SetVolume(0.4f);
     }
     yield return(null);
 }
Example #2
0
    public override IEnumerator StartInteraction()
    {
        talkControl = GameObject.Find("Talk UI(Clone)").GetComponent <TalkController>();
        jukebox     = GameObject.Find("JukeBox(Clone)").GetComponent <JukeBoxController>();
        jukebox.PlaySong("WillsTheme");
        StartCoroutine(jukebox.FadeIn(0.4f));

        switch (GameControl.control.DPMainData.progression)
        {
        case 1:
            yield return(StartCoroutine(talkControl.StartDialogueSprite(dialogue[0], "default", 1, 0)));

            GameControl.control.DPMainData.key = true;
            Debug.Log("KEY DP");
            yield return(StartCoroutine(talkControl.StartDialogueSolo(new string[] { "You received the Dead Performance Key" })));

            GameControl.control.DPMainData.key = true;
            yield return(StartCoroutine(talkControl.StartDialogueSprite(dialogue[1], "default", 1, 0)));

            GameControl.control.Freeze();
            yield return(new WaitForSeconds(1f));

            yield return(StartCoroutine(talkControl.StartDialogueSprite(dialogue[2], "default", 1, 0)));

            GameControl.control.DPMainData.progression = 2;
            DestroyThis();
            break;

        case 5:
            yield return(StartCoroutine(talkControl.StartDialogueSprite(dialogue[0], "default", 1, 0)));

            GameControl.control.DPMainData.progression = 6;
            DestroyThis();
            break;

        default:
            yield return(StartCoroutine(talkControl.StartDialogueSprite(dialogue[0], "default", 1, 0)));

            DestroyThis();
            break;
        }
        GameControl.control.DPMainData.williamTalked = true;
        jukebox.SetVolume(0.6f);
        jukebox.PlaySong("DP");
    }
 public override IEnumerator StartInteraction()
 {
     jukebox.ReplaceSongPartway("DP");
     jukebox.SetVolume(0.6f);
     yield return(null);
 }