// Update is called once per frame

    public override IEnumerator StartInteraction()
    {
        float time;

        GameControl.control.Freeze();
        StartCoroutine(Visability(false, otherWilliam, otherLight));
        yield return(StartCoroutine(jukebox.PauseOut(0.4f)));

        time = jukebox.CurrentTime();
        jukebox.StopSong();
        anim.SetBool("Paused", true);
        jukebox.PlaySong("WillsTheme");
        StartCoroutine(Visability(true, William, thisLight));
        yield return(StartCoroutine(jukebox.FadeIn(0.4f)));

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

        GameControl.control.DPMainData.progression = 9;
        GameControl.control.DPMainData.viTalked    = false;
        StartCoroutine(jukebox.FadeOut(0.4f));
        yield return(StartCoroutine(Visability(false, William, thisLight)));

        anim.SetBool("Paused", false);
        jukebox.PlaySongPartway("DP", time);
        yield return(StartCoroutine(Visability(true, otherWilliam, otherLight)));

        GameControl.control.DPMainData.progression = 9;
        GameControl.control.DPMainData.viTalked    = false;

        Destroy(William.gameObject);
        Destroy(this.gameObject);
    }
    public override IEnumerator StartInteraction()
    {
        Debug.Log("Hello");
        GameControl.control.Freeze();
        yield return(StartCoroutine(jukebox.FadeOut(0.6f)));

        jukebox.StopSong();
        yield return(new WaitForSeconds(0.5f));

        jukebox.PlaySong("WillsTheme");
        yield return(StartCoroutine(jukebox.FadeIn(0.4f)));

        yield return(StartCoroutine(Visability(true)));

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

        GameControl.control.Freeze();
        yield return(StartCoroutine(talkCanvas.StartDialogueSolo(new string[] { "You received the Blue Lens" })));

        GameControl.control.lens[0] = true;
        GameControl.control.Freeze();
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[1], "default", 1, 0)));

        GameControl.control.Freeze();
        yield return(StartCoroutine(Visability(false)));

        yield return(new WaitForSeconds(.5f));

        yield return(StartCoroutine(Visability(true)));

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

        GameControl.control.Freeze();
        yield return(StartCoroutine(Visability(false)));

        yield return(new WaitForSeconds(.5f));

        yield return(StartCoroutine(Visability(true)));

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

        GameControl.control.Freeze();
        StartCoroutine(Visability(false));
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[4], "default", 1, 0)));

        jukebox.PlaySong("DP");
        Destroy(this);
        yield return(null);
    }
示例#3
0
    public IEnumerator displayZone()
    {
        switch (newZone)
        {
        case "SE":
            zoneText.text = "Silent Entryhall";
            break;

        case "DP":
            zoneText.text = "Dead Performance";
            break;

        case "FM":
            zoneText.text = "Forgotten Mezzanine";
            break;

        case "FK":
            zoneText.text = "Festered Kiln";
            break;

        case "NB":
            zoneText.text = "Natural Banquet";
            break;

        case "FL":
            zoneText.text = "Frigid Loft";
            break;

        case "CD":
            zoneText.text = "Cavernous Decline";
            break;

        case "DS":
            zoneText.text = "Departure Sandbox";
            break;

        case "DH":
            zoneText.text = "Desolate Heart";
            break;
        }

        //Debug.Log(newZone);
        StartCoroutine(jukebox.FadeOut(0.6f));
        yield return(new WaitForSeconds(1f));

        for (float i = 0f; i < 255f; i += 4.25f)
        {
            zoneText.color = new Color(255f, 255f, 255f, i / 255f);
            yield return(new WaitForSeconds(0.025f));
        }
        jukebox.ResumeOverworldSong();
        StartCoroutine(jukebox.FadeIn(0.6f));
        zoneText.color = new Color(255f, 255f, 255f, 255f);
        yield return(new WaitForSeconds(1.5f));

        StartCoroutine(transitionIn());


        yield return(new WaitForSeconds(3f));

        for (float i = 255f; i > 0f; i -= 8.5f)
        {
            zoneText.color = new Color(255f, 255f, 255f, i / 255f);
            yield return(new WaitForSeconds(0.005f));
        }
        zoneText.color = new Color(255f, 255f, 255f, 0f);
        transitioning  = false;
        yield return(null);
    }