void Start()
    {
        _gazePointDataComponent = GetComponent <GazePointDataComponent>();
        _userPresenceComponent  = GetComponent <UserPresenceComponent>();

        CurrentState = LookingState.Center;
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        _tr = GetComponent<Transform>();
        _camera = Camera.main;
        _flawGO.AddRange(GameObject.FindGameObjectsWithTag("Flaw"));
        gaze = GetComponent<GazePointDataComponent>();
        _eyexHost = EyeXHost.GetInstance();
        _handAnim = gameObject.GetComponentInChildren<Animator>();
        gameObject.GetComponentInChildren<Renderer>().material.color = Color.Lerp(Color.white, Color.clear, 0.3f);
        _handTrans = _tr.GetChild(0);
		clueManager = new ClueManager ();
		if (GameObject.FindGameObjectsWithTag ("Clue").Length < 1) {
			puzzleSolved = true;
		}

        GameObject _fade = new GameObject("Fadeout");
        Texture2D _tex2D = new Texture2D(1,1);
        _tex2D.SetPixel(0, 0, Color.white);
        _tex2D.Apply();
        _fadeout = _fade.AddComponent<SpriteRenderer>();
        _fadeout.sprite = Sprite.Create(_tex2D, new Rect(0, 0, 1, 1), new Vector2(0.5f, 0.5f));
        _fadeout.material.color = Color.black;
        _fade.transform.localScale = new Vector3(999,999,999);
        _fade.transform.position = _tr.position + _tr.forward*0.5f;
        _fade.transform.eulerAngles = _camera.transform.eulerAngles;
        _fade.transform.parent = _tr;
    }
Esempio n. 3
0
 void Start()
 {
     _eyexHost = EyeXHost.GetInstance();
     gaze = GetComponent<GazePointDataComponent>();
     _button = GetComponent<Button>();
     _rend = GetComponent<Image>();
 }
Esempio n. 4
0
 // Use this for initialization
 void Start()
 {
     FixationComponent = GetComponent<FixationDataComponent>();
     //FixationComponent.enabled = false;
     selectableObjects = GameObject.FindGameObjectsWithTag("MoveableObject");
     gazeData = GetComponent<GazePointDataComponent>();
     confirmSelectionSound = GetComponent<AudioSource>();
 }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ThirdPersonCamera>();
     gazeData = GetComponent<GazePointDataComponent>();
     if (!gazeData)
     {
         gazeData = new GazePointDataComponent();
     }
 }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        gazePointData = GetComponent <GazePointDataComponent>();

        OpenSerialPort();
        InvokeRepeating("SendControlData", 0, SEND_FREQUENCY);

        Application.LoadLevel("drive");
        UnityArduino.SendImmediate("1");
        UnityArduino.SetStreamControlData(true);
    }
    void Start()
    {
        rb    = GetComponent <Rigidbody> ();
        count = 0;         //count for collecting number
        //countText.text = "Count: " + count.ToString ();
        SetCountText();
        winText.text = "";

        _eyeXHost = EyeXHost.GetInstance();
        _gazePointDataComponent = GetComponent <GazePointDataComponent>();
        _rendererComponent      = GetComponent <Renderer>();
    }
Esempio n. 8
0
 void Start()
 {
     eyeXHost = EyeXHost.GetInstance();
     gazePointDataComponent = GetComponent <GazePointDataComponent>();
 }
Esempio n. 9
0
    // Use this for initialization
    void Start()
    {
        cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ThirdPersonCamera>();
        cuttableLayer = 1 << LayerMask.NameToLayer("Cuttable");
        gazeData = GetComponent<GazePointDataComponent> ();
        if(!gazeData)
        {
            gazeData = new GazePointDataComponent();
        }

        lineTex = new Texture2D(2, 2);
        lineTex.SetPixel(0, 0, Color.white);
        lineTex.wrapMode = TextureWrapMode.Repeat;
        lineTex.Apply();
    }
Esempio n. 10
0
    /// <summary>
    /// Use this for initialization.
    /// </summary>
    void Start()
    {
        cameraXform = this.transform;//.parent;
        if (cameraXform == null)
        {
            Debug.LogError("Parent camera to empty GameObject.", this);
        }

        follow = GameObject.FindWithTag("Player").GetComponent<CharacterControllerLogic>();
        followXform = GameObject.FindWithTag("CameraFollowXForm").transform;
        centeredTarget = GameObject.FindWithTag("CenteredTarget").transform;
        overTheShoulderTarget = GameObject.FindWithTag("OverTheShoulderTarget").transform;

        lookDir = followXform.forward;
        curLookDir = followXform.forward;

        barEffect = GetComponent<BarsEffect>();
        if (barEffect == null)
        {
            Debug.LogError("Attach a widescreen BarsEffect script to the camera.", this);
        }

        camState = startingState;
        eyeControlState = startingEyeState;
        freeCameraViewMode = startingFreeCameraViewMode;

        if (freeCameraViewMode == FreeCameraViewModes.Centered)
        {
            //set position to centered target
            this.transform.position = centeredTarget.transform.position;
        }
        else
        {
            this.transform.position = overTheShoulderTarget.transform.position;
        }

        // Intialize values to avoid having 0s
        characterOffset = followXform.position + new Vector3(0f, distanceUp, 0f);
        distanceUpFree = distanceUp;
        distanceAwayFree = distanceAway;
        savedRigToGoal = RigToGoalDirection;

        //Eye tracking code
        fixationData = GetComponent<FixationDataComponent>();
        gazeData = GetComponent<GazePointDataComponent>();
        if (!fixationData)
        {
            fixationData = new FixationDataComponent();
        }
        if (!gazeData)
        {
            gazeData = new GazePointDataComponent();
        }
    }
Esempio n. 11
0
 // Use this for initialization
 void Awake()
 {
     gazeData = GetComponent<GazePointDataComponent> ();
     allExperients = new List<Experiment>();
 }
 void Start()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _gazePointDataComponent = GetComponent <GazePointDataComponent>();
     _rendererComponent      = GetComponent <Renderer>();
 }
Esempio n. 13
0
 // Use this for initialization
 void Start()
 {
     _gazePointDataComponent = GetComponent <GazePointDataComponent>();
     _userPresenceComponent  = GetComponent <UserPresenceComponent>();
     _camera = Camera.main;
 }
Esempio n. 14
0
 void Start()
 {
     _gazePointDataComponent = GetComponent <GazePointDataComponent>();
     _userPresenceComponent  = GetComponent <UserPresenceComponent>();
     _lightComponent         = GetComponent <Light>();
 }
 void Start()
 {
     _gazePointDataComponent = GetComponent<GazePointDataComponent>();
     _userPresenceComponent = GetComponent<UserPresenceComponent>();
     _lightComponent = GetComponent<Light>();
 }
Esempio n. 16
0
 void Start()
 {
     _gazePointDataComponent = GetComponent <GazePointDataComponent>();
     _userPresenceComponent  = GetComponent <UserPresenceComponent>();
     _rendererComponent      = GetComponent <SpriteRenderer>();
 }
    private Vector2 gazePointOnDisplayPlaneMm;              //gaze point location

    void Start()                                            // at the start detect the eye gaze positions
    {
        _eyeXHost = EyeXHost.GetInstance();
        _gazePointDataComponent = GetComponent <GazePointDataComponent>();
        _rendererComponent      = GetComponent <Renderer>();
    }
Esempio n. 18
0
	// Use this for initialization
	void Start () {
		gaze = GetComponent<GazePointDataComponent>();
		_eyexHost = EyeXHost.GetInstance();
	}
Esempio n. 19
0
 void Start()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _gazePointDataComponent = GetComponent<GazePointDataComponent>();
     _rendererComponent = GetComponent<Renderer>();
 }