Example #1
0
    // Use this for initialization
    void Start()
    {
        trackedObj = GetComponent <SteamVR_TrackedObject>();
        Assert.IsTrue(text != null, "Debug text cannot null");
        Assert.IsTrue(monitor != null, "Debug monitor cannot null");

        text.enabled = true;
        monitor.SetActive(true);

        vC = sceneManager.instance.vCs [visIndex];
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        Assert.IsTrue(angle != null);
        q = angle.transform.eulerAngles;         //get initial angle of camera

        vC = GetComponent <visibilityCheck> ();
        lb = GetComponent <laserBehavior> ();

        audioSrc = GetComponent <GvrAudioSource> ();

        Assert.IsTrue(audioSrc.clip != null);
        audioSrc.playOnAwake = false;
        audioSrc.loop        = true;
    }
Example #3
0
    void processDebugControls()
    {
        device = SteamVR_Controller.Input((int)trackedObj.index);

        if (device.GetPressDown(SteamVR_Controller.ButtonMask.Trigger) && gameObject.name == "Controller (left)")
        {
            visIndex = (visIndex + 1) % sceneManager.instance.vCs.Length;
            vC       = sceneManager.instance.vCs [visIndex];
        }

        monitor.GetComponent <Renderer> ().material.mainTexture = vC.rt;

        //Make sure updates are slow enough to be readable
        if (Time.frameCount % 90 == 0)
        {
            text.text = vC.gameObject.name +
                        "\nVisScore: " + vC.visScore +
                        "\nscreenSpace: " + vC.screenSpaceFactor + " " + vC.screenSpace +
                        "\ncolorContrast: " + vC.colorContrastFactor + " " + vC.colorContrast +
                        "\nposition: " + vC.posPenFactor + " " + vC.positionPen;
        }
    }
Example #4
0
    void Start()
    {
        for (int i = 0; i < points.Length; i++)
        {
            Assert.IsTrue(points [i] != null);
        }

        anim     = GetComponent <Animator>();
        rb       = gameObject.GetComponent <Rigidbody>();
        vC       = gameObject.GetComponent <visibilityCheck> ();
        lb       = gameObject.GetComponentInChildren <laserBehavior> ();
        agent    = GetComponent <NavMeshAgent>();
        audioSrc = GetComponent <GvrAudioSource> ();
        target   = sceneManager.instance.target;

        // Disabling auto-braking allows for continuous movement
        // between points (ie, the agent doesn't slow down as it
        // approaches a destination point).
        agent.autoBraking = true;
        agent.speed       = 0.1f;

        GotoNextWayPoint();
    }