Esempio n. 1
0
    void Update()
    {
        if (ultimoEjercicio != ejercicio)
        {
            ActivarEjercicio();
            ultimoEjercicio = ejercicio;
        }

        switch (ejercicio)
        {
        case Ejercicios.Uno:
        {
            E1.rotation *= rotacion;

            VectorDebugger.UpdatePosition("E1", E1.forward * 10f);
            break;
        }

        case Ejercicios.Dos:
        {
            E2_1.rotation *= rotacion;
            E2_3.rotation  = E2_1.rotation;

            E2[1] = E2_1.transform.forward * 10f;
            E2[2] = E2_1.transform.forward * 10f + E2_2.transform.forward * 10f;
            E2[3] = E2_1.transform.forward * 10f + E2_2.transform.forward * 10f + E2_3.transform.forward * 10f;

            VectorDebugger.UpdatePositionsSecuence("E2", E2);
            break;
        }

        case Ejercicios.Tres:
        {
            E3_1.rotation *= rotacion;
            E3_3.rotation  = E3_1.rotation;

            E3[1] = E3_1.transform.forward * 10f;
            E3[2] = E3_1.transform.forward * 10f + E3_2.transform.forward * 10f;
            E3[3] = E3_1.transform.forward * 10f + E3_2.transform.forward * 10f + E3_3.transform.forward * 10f;

            VectorDebugger.UpdatePositionsSecuence("E3", E3);
            break;
        }
        }
    }