Example #1
0
    public void GetNewPrompt()
    {
        string newPrompt = prompts.GetRandomPrompt();

        while (newPrompt == current)
        {
            newPrompt = prompts.GetRandomPrompt();
        }

        current   = newPrompt;
        text.text = current;
    }
Example #2
0
 // 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;
 }