// Update is called once per frame void Update() { // Replace with stepping on tiles later on if (Input.GetKeyDown(KeyCode.Q) && !quizOpen) { if (api) // Checks if the api is present. { api.MakeRequest( new Action <Response>((Response response) => { question = response.results; Quiz(); }) ); } instance = this; } }
// Update is called once per frame void Update() { // Replace with stepping on tiles later on instance = this; if (GridManager.requestQuestion && !quizOpen) { busy = true; GridManager.requestQuestion = false; if (api) // Checks if the api is present. { api.MakeRequest( new Action <Response>((Response response) => { question = response.results; Quiz(); }) ); } else { } } }