List <QuestionGenMethod> questionList = new List <QuestionGenMethod>(); //question type //QuestionGenMethod questionList; // Start is called before the first frame update. Only runs once each time the scene loads. void Start() { //Finds the corresponding game objects answerBox = GameObject.Find("AnswerField").gameObject; codeQuestion = GameObject.Find("CodeQuestion").gameObject; correctPopup = GameObject.Find("CorrectPopup").gameObject; //Note: Find only works on active objects correctPopup.SetActive(false); //Deactivates the popup panel wrongPopup = GameObject.Find("WrongPopup").gameObject; wrongPopup.SetActive(false); fbq = gameObject.GetComponent <FillInTheBlankQuestion>(); //Picks a random fill in the blank question StartCoroutine(DelayedStart()); //Generates the first question answerBox.GetComponent <InputField>().ActivateInputField(); //So the user doesn't need to click inside the input field to start }
List <QuestionGenMethod> questionList = new List <QuestionGenMethod>(); //question type //QuestionGenMethod questionList; // Start is called before the first frame update. Only runs once each time the scene loads. void Start() { //Finds the corresponding game objects answerBox = GameObject.Find("AnswerField").gameObject; codeQuestion = GameObject.Find("CodeQuestion").gameObject; correctPopup = GameObject.Find("CorrectPopup").gameObject; //Note: Find only works on active objects correctPopup.SetActive(false); //Deactivates the popup panel wrongPopup = GameObject.Find("WrongPopup").gameObject; wrongPopup.SetActive(false); scoreBox = GameObject.Find("Score").gameObject; scoreBox.GetComponent <Text>().text = "Score: " + GameManager.instance.score; //displays the current score questionTypes = GameManager.instance.fitbTypes; //Grabs the question types from the game manager fbq = gameObject.GetComponent <FillInTheBlankQuestion>(); //Picks a random fill in the blank question StartCoroutine(DelayedStart()); //Generates the first question answerBox.GetComponent <InputField>().ActivateInputField(); //So the user doesn't need to click inside the input field to start }