Пример #1
0
    // Update is called once per frame
    void Update()
    {
        attentionValue = attentionScript.getAttention();
        if (numOfTargetDestroyed >= 5)
        {
            if (mode == 0)
            {
                attentionThreshold += 10;
            }
            else if (mode == 1)
            {
                TimeRequiredForAction += 1.0f;
            }
            numOfTargetDestroyed = 0;
            level++;
            Debug.Log("Final time: " + displayAttention.GetComponent <displayAttention>().time);
            displayAttention.GetComponent <displayAttention>().time = 0.0f;
        }
        Debug.Log("attention threshold: " + attentionThreshold);
        PerformRaycast();
        CheckFocus();

        CheckFloorGazeForTP();

        previousFocus       = focusedObject;
        lastFrameFloorGazed = currentFrameFloorGazed;


        if (Input.GetKeyDown(KeyCode.S))
        {
            ShootLaser();
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     displayData = mainCam.GetComponent <DisplayData>();
     eyeGaze     = mainCam.GetComponent <EyeGaze>();
     attention   = displayData.getAttention();
     time        = 0.0f;
     text        = GetComponent <Text>();
     text.text   = "Time Elapsed: " + time + "\nAttention: " + attention + "\nLevel: " + eyeGaze.level;
     InvokeRepeating("timer", 0, 0.1f);
 }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        attention = displayData.getAttention();

        text.text = "Time Elapsed: " + time + "\nAttention: " + attention + "\nLevel: " + eyeGaze.level;
    }