// 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); }
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); }
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() { 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); }
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; }
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); }