Exemplo n.º 1
0
    // 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;
        }
    }
Exemplo n.º 2
0
    // 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
            {
            }
        }
    }