// Use this for initialization void Start() { convoScriptText = GameObject.FindGameObjectWithTag("ConvoUIText").GetComponent <ConversationScript>(); if (convoScriptText == null) { Debug.LogError("The text for the Conversation has been tagged incorrectly."); } if (!GlobalVars.isTutorial) //don't scamble it if we're in the tutorial { string[] scrambledDialogue = new string[dialogue.Length]; for (int index = 0; index < dialogue.Length; index++) //filter each piece of dialogue into the scamblers { scrambledDialogue[index] = ScrambleText.ScramblingText(dialogue[index]); } dialogue = scrambledDialogue; //set dialogue equal to the scrambled text } //set the components in convoScript to the ones in this dialogue handler convoScriptText.conversation = dialogue; convoScriptText.faceArray = faceArray; }
// Use this for initialization void Start() { text = GetComponentInChildren <Text>(); if (text == null) { text = GetComponent <Text>(); } if (!GlobalVars.isTutorial) { text.text = ScrambleText.ScramblingText(text.text); } }