void OnTriggerEnter(Collider collidedWith) { if (collidedWith.gameObject != enterRej.gameObject) { enterOutput = Regex.Split(enterTxt.text, "&&"); textDialogue.OutputDialogue(enterOutput, colorFlag); if (closeOnEnter) { gameObject.SetActive(false); } } }
void Update() { if (triggered) { if (timer > 0) { timer = timer - Time.deltaTime; } else { output = Regex.Split(txt.text, "&&"); textDialogue.OutputDialogue(output, colorFlag); gameObject.SetActive(false); } } }