public void GetNewPrompt() { string newPrompt = prompts.GetRandomPrompt(); while (newPrompt == current) { newPrompt = prompts.GetRandomPrompt(); } current = newPrompt; text.text = current; }
// Start is called before the first frame update void Start() { if (text == null) { text = GetComponentInChildren <Text>(); } prompts = FindObjectOfType <Prompts>(); current = prompts.GetRandomPrompt(); //text.text = current; }