Esempio n. 1
0
    void ActivarEjercicio()
    {
        switch (ejercicio)
        {
        case Ejercicios.Uno:
        {
            VectorDebugger.TurnOnVector("E1");
            VectorDebugger.TurnOffVector("E2");
            VectorDebugger.TurnOffVector("E3");

            break;
        }

        case Ejercicios.Dos:
        {
            VectorDebugger.TurnOffVector("E1");
            VectorDebugger.TurnOnVector("E2");
            VectorDebugger.TurnOffVector("E3");

            break;
        }

        case Ejercicios.Tres:
        {
            VectorDebugger.TurnOffVector("E1");
            VectorDebugger.TurnOffVector("E2");
            VectorDebugger.TurnOnVector("E3");

            break;
        }
        }
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        Vec3 A = new Vec3(a);
        Vec3 B = new Vec3(b);
        multiplicacion = new Vec3(a);
        multiplicacion.Scale(B);
        if (timer >= 1.0f) timer = 0;
        timer += Time.deltaTime;
        timer2 += Time.deltaTime;


        if (Input.GetKeyDown(KeyCode.O))
        {
            VectorDebugger.TurnOffVector("elAzul");
        }
        if (Input.GetKeyDown(KeyCode.P))
        {
            VectorDebugger.TurnOnVector("elAzul");
        }
  
        VectorDebugger.UpdatePosition("La verde", A);
        VectorDebugger.UpdatePosition("La azul", B);
        switch (ejercicio) 
        {
            case Ejercicio.uno:
                VectorDebugger.UpdatePosition("La roja", new Vec3(a + b));
                break;
            case Ejercicio.dos:
                VectorDebugger.UpdatePosition("La roja", new Vec3(b - a));
                break;
            case Ejercicio.tres:
                result = multiplicacion;
                VectorDebugger.UpdatePosition("La roja", new Vec3(multiplicacion));
                break;
            case Ejercicio.cuatro:
                VectorDebugger.UpdatePosition("La roja", new Vec3(Vec3.Cross(A,B)));
                break;
            case Ejercicio.cinco:
                VectorDebugger.UpdatePosition("La roja", Vec3.Lerp(B, A, timer));
                break;
            case Ejercicio.seis:
                VectorDebugger.UpdatePosition("La roja", Vec3.Max(A,B));
                break;
            case Ejercicio.siete:
                VectorDebugger.UpdatePosition("La roja", Vec3.Project(A,B));
                break;
            case Ejercicio.ocho:
                VectorDebugger.UpdatePosition("La roja", new Vec3(a + b));
                break;
            case Ejercicio.nueve:
                VectorDebugger.UpdatePosition("La roja", Vec3.Reflect(A,B));
                break;
            case Ejercicio.diez:
                VectorDebugger.UpdatePosition("La roja", Vec3.LerpUnclamped(A,B,timer2));
                break;
        } 
    }
Esempio n. 3
0
    void Start()
    {
        VectorDebugger.EnableCoordinates();

        Blanco = origVec;
        Negro  = new Vector3(25.0f, 20.0f, 20.0f);

        VectorDebugger.AddVector(Blanco, Color.white, "Blanco");
        VectorDebugger.AddVector(Negro, Color.black, "Negro");
        VectorDebugger.AddVector(Rojo, Color.red, "Rojo");
        VectorDebugger.AddVector(Rojo, Color.green, "Verde");
        VectorDebugger.TurnOffVector("Blanco");
        VectorDebugger.TurnOffVector("Negro");
        VectorDebugger.TurnOffVector("Rojo");
        VectorDebugger.TurnOffVector("Verde");
        VectorDebugger.EnableEditorView();
    }
Esempio n. 4
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.W))
        {
            transform.rotation = Quaternion.FromToRotation(transform.forward, Vector3.up);
            Debug.Log("arriba");
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            transform.rotation = rot1;
            Debug.Log("abajo");
        }
        if (Input.GetKeyDown(KeyCode.A))
        {
            transform.rotation = rot;
            Debug.Log("izquierda");
        }
        if (Input.GetKeyDown(KeyCode.D))
        {
            transform.rotation = rot;
            Debug.Log("derecha");
        }
        if (Input.GetKeyDown(KeyCode.Space))
        {
            transform.rotation = rot;
            Debug.Log("hizo la wea ya");
        }


        if (Input.GetKeyDown(KeyCode.O))
        {
            VectorDebugger.TurnOffVector("elAzul");
        }
        if (Input.GetKeyDown(KeyCode.P))
        {
            VectorDebugger.TurnOnVector("elAzul");
        }
    }