Beispiel #1
0
    void LancarPergunta()
    {
        Question.gameObject.SetActive(true);
        devePerguntar = false;
        gerarValores();

        Question.text = "Quanto é " + primeiroValor.ToString() + " " + sinal + " " + segundoValor.ToString() + "?";

        teste += 1;

        Debug.Log(cam.transform.position.x);
        a1 = Instantiate(caixa, new Vector3(cam.transform.position.x + 150.0f + 10.0f, 49.90f, 4.7f), Quaternion.Euler(new Vector3(4.0f, -4.0f, -6.0f)));
        BoxScript box1 = a1.GetComponent <BoxScript>();

        box1.setResult(resp1);

        a2 = Instantiate(caixa, new Vector3(cam.transform.position.x + 150.0f + 5.0f, 49.92f, 0.0f), Quaternion.Euler(new Vector3(0.0f, 0.0f, -10.0f)));
        BoxScript box2 = a2.GetComponent <BoxScript>();

        box2.setResult(resp2);

        a3 = Instantiate(caixa, new Vector3(cam.transform.position.x + 150.0f, 49.89f, -4.7f), Quaternion.Euler(new Vector3(-4.0f, 4.0f, -0.0f)));
        BoxScript box3 = a3.GetComponent <BoxScript>();

        box3.setResult(resp3);
    }