//public void Slide (string text, string name, bool left){ public void TextNameDirection(string textnamedirection) { string[] words = textnamedirection.Split(char.Parse("+")); //textnamedirection.Split (" "); string text = words [0]; string name = words [1]; bool left; BBoxScript.ClearTextHolder(); if (words [2].Equals("left")) { left = true; } else { left = false; } GameManager.TextNumber++; if (left == true) { BBoxScript.setLeftPictureName(name); } else { BBoxScript.setRightPictureName(name); BBoxScript.SwitchBoxDirection(); //Debug.Log (left); } BBoxScript.Slide(text); }
IEnumerator PauseAndOpenTextBox() { yield return(new WaitForSeconds(1.0f)); // BBScript.ChangeText ("Oh ho, so you've arrived!"); GameManager.Scene = "Castle 1"; // BlackBoxScript.SpeedAble = true; BBScript.SwitchBoxDirection(); BBScript.Slide("Oh ho, so you've arrived!"); BlackBoxScript.FinishedText = false; }
IEnumerator PauseAndOpenTextBox(string text, bool left, string portrait) { yield return(new WaitForSeconds(1.0f)); // BBScript.ChangeText ("Oh ho, so you've arrived!"); // BlackBoxScript.SpeedAble = true; // BBoxScript.SwitchBoxDirection (); BBoxScript.Slide(text); if (left == true) { BBoxScript.setLeftPictureName(portrait); } else { BBoxScript.setRightPictureName(portrait); BBoxScript.SwitchBoxDirection(); //Debug.Log (left); } }
// Update is called once per frame void Update() { //Debug.Log (GameManager.EventNumber); if (EnabledTriggers == true) { EnableTriggers = true; } else { EnableTriggers = false; } if (isFadingIn) { if (FadeIn + 0.015f < 1.0f) { FadeIn += 0.015f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(FadeColour, FadeColour, FadeColour, FadeIn); } else { EventNumber++; isFadingIn = false; } } if (isFadingOut) { if (FadeIn - 0.015f > 0) { FadeIn -= 0.015f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(FadeColour, FadeColour, FadeColour, FadeIn); } else { EventNumber++; isFadingOut = false; CutsceneBlue.GetComponent <GUITexture>().enabled = false; } } if (FadeInAndOut == true) { if (CutsceneBlue.GetComponent <GUITexture>().enabled == false) { CutsceneBlue.GetComponent <GUITexture>().enabled = true; FadeIn = 0.0f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(1f, 1f, 1f, FadeIn); Whiten = true; } if (Whiten == true) { if (FadeIn + 0.015f < 1.0f) { FadeIn += 0.015f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(1f, 1f, 1f, FadeIn); } else { //DO SOMETHING.... Whiten = false; } } if (Whiten == false) { if (FadeIn - 0.015f > 0) { FadeIn -= 0.015f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(1f, 1f, 1f, FadeIn); } else { EventNumber++; TextNumber++; CutsceneBlue.GetComponent <GUITexture>().enabled = false; FadeInAndOut = false; } } } if (Location == "Field") { if (Scene == "Field 1") { if (EventNumber == 0) { if (FadeIn - 0.015f > 0) { FadeIn -= 0.015f; CutsceneBlue.GetComponent <GUITexture>().color = new Color(1f, 1f, 1f, FadeIn); } else { CutsceneBlue.GetComponent <GUITexture>().enabled = false; EventNumber++; //BlackBoxScript.SpeedAble = true; BBScript.setLeftPictureName("Devilchu"); BBScript.setRightPictureName("Devichi"); BBScript.Slide("...And that is why apples are factually the superior fruit!~"); BBScript.ActivateEmoticon("Devilchu", "Happy", false); } } else if (EventNumber == 1) { } } } if (Location == "FieldCutscene") { if (Scene == "FieldCutscene 1") { if (EventNumber == 1) { BBScript.Slide("Hey you!"); BBScript.setRightPictureName("Leafree"); BBScript.SwitchBoxDirection(); EventNumber++; //TextNumber = EventNumber; } if (EventNumber == 9) { Scene = "FieldCutscene 2"; MyAnimation.Play("FieldLeafree 2", 0, 0.0f); EventNumber++; } } if (Scene == "FieldCutscene 2") { if (EventNumber == 15) { Scene = "FieldCutscene 3"; EventNumber = 0; TextNumber = 0; MyAnimation.Play("FieldLeafree 3", 0, 0.0f); } } } }