Esempio n. 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));
    }
    // 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);
    }
Esempio n. 3
0
 public override IEnumerator StartInteraction()
 {
     if (jukebox.IsPlaying())
     {
         jukebox.StopSong();
     }
     yield return(null);
 }
    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);
    }
Esempio n. 5
0
    public override IEnumerator StartInteraction()
    {
        float dissappear = 1f;

        Debug.Log("Hello");
        GameControl.control.Freeze();
        yield return(new WaitForSeconds(2.0f));

        WillAnim.SetBool("Paused", true);
        jukebox.StopSong();
        //stop music
        Destroy(wgc);
        yield return(new WaitForSeconds(1.0f));

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

        GameControl.control.Freeze();
        WillAnim.SetBool("Finished", true);
        yield return(new WaitForSeconds(0.09f));

        thisLight.cookie = getUpCookie;
        yield return(new WaitForSeconds(0.1f));

        thisLight.cookie             = cookie;
        thisLight.transform.position = thisLight.GetComponentInParent <Transform>().position;
        yield return(new WaitForSeconds(0.2f));

        WillAnim.SetBool("Spin", true);
        yield return(new WaitForSeconds(2f));

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

        GameControl.control.Freeze();
        while (dissappear > 0)
        {
            dissappear          -= 0.1f;
            thisLight.intensity -= 0.2f;
            William.color        = new Color(1f, 1f, 1f, dissappear);
            yield return(new WaitForSeconds(0.1f));
        }
        DestroyImmediate(William.gameObject);
        GameControl.control.DPMainData.progression   = 1;
        GameControl.control.DPMainData.viTalked      = false;
        GameControl.control.DPMainData.williamTalked = false;
        GameControl.control.Unfreeze();
        DestroyImmediate(this.gameObject);
        yield return(null);
    }
    public override IEnumerator StartInteraction()
    {
        float time;

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

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

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

        anim.SetBool("Paused", false);
        jukebox.PlaySongPartway("DP", time);
    }
Esempio n. 7
0
    public override IEnumerator StartInteraction()
    {
        GameControl.control.Freeze();
        jukebox.StopSong();


        StartCoroutine(cameraControl.FadeIn(2f));

        yield return(StartCoroutine(cameraControl.MoveFromPointToPoint(new Vector2(0, -0.48f), new Vector2(0, 0f), 1.5f)));

        yield return(new WaitForSeconds(0.5f));

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

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

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

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

        for (int i = 0; i < 5; i++)
        {
            StartCoroutine(Vanish(entourage[i], entourageLight[i]));
            yield return(new WaitForSeconds(0.5f));
        }
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[3], "default", 4, 10)));

        GameControl.control.Freeze();
        yield return(StartCoroutine(Vanish(chadley, chadleyLight)));

        jukebox.PlaySong("InTheDeepestDarkness");
        StartCoroutine(jukebox.FadeIn(1f));
        yield return(new WaitForSeconds(0.5f));

        StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.1f));
        heartbeat.Play();
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[4], "default", 1, 0)));

        StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.15f));
        tar.sprite       = tarForms[0];
        mirrorTar.sprite = tarForms[0];
        heartbeat.Play();
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[4], "default", 1, 0)));

        StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.2f));
        tar.sprite       = tarForms[1];
        mirrorTar.sprite = tarForms[1];
        heartbeat.Play();
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[5], "default", 1, 0)));

        StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.2f));
        tar.sprite       = tarForms[2];
        mirrorTar.sprite = tarForms[2];
        heartbeat.Play();
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[6], "default", 1, 0)));

        GameControl.control.Freeze();
        heartbeat.Play();
        yield return(StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.2f)));

        heartbeat.Play();
        yield return(StartCoroutine(cameraControl.ShakeCamera(0.25f, 0.2f)));

        tar.sprite       = tarForms[3];
        mirrorTar.sprite = tarForms[3];
        yield return(StartCoroutine(talkCanvas.StartDialogueSprite(dialogue[7], "default", 1, 0)));

        GameControl.control.PlayerFreeze();
        yield return(StartCoroutine(Vanish(William, thisLight)));

        tar.sprite = null;
        GameObject tarNew = Instantiate(tarEnemy);

        mirrorTar.GetComponent <MirrorObject>().UpdateObjectToBeMirrored(tarNew);
        GameControl.control.DPMainData.progression = 10;
        GameControl.control.PlayerFreeze();
        Destroy(this.gameObject);
        //GameObject.Find("AgroRange").GetComponent<CircleCollider2D>().radius = 2f;
    }