示例#1
0
    private void Start()
    {
        _host = EyeXHost.GetInstance();
        _host.Start();

        _originalRunInBackgroundState = Application.runInBackground;
    }
示例#2
0
    protected virtual void Awake()
    {
        _eyeXHost     = EyeXHost.GetInstance();
        _interactorId = gameObject.GetInstanceID().ToString();

        _boxCollider = GetComponent <BoxCollider>();
    }
示例#3
0
        private void setupMainWindow()
        {
            DataContext = this;
            InitializeComponent();
            eyeXHost = new EyeXHost();
            eyeXHost.Start();

            var fixationData = eyeXHost.CreateFixationDataStream(FixationDataMode.Sensitive);
            var gazeData     = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);

            fixationData.Next += fixTrack;
            gazeData.Next     += trackDot;

            if (ReceiverOn)
            {
                IPHostEntry ipHostInfo = Dns.GetHostByName(Dns.GetHostName());
                IPAddress   ipAddress  = ipHostInfo.AddressList[0];
                Receive_Status_Text.Text       = "Receiving Data at\nIP:" + ipAddress.ToString();
                Receive_Status_Text.Visibility = Visibility.Visible;
            }
            if (SenderOn)
            {
                SenderIP = defaultSenderIP;
                Share_Status_Text.Text       = "Sharing Data to\nIP:" + SenderIP.ToString();
                Share_Status_Text.Visibility = Visibility.Visible;
                communication_started_Sender = false;
            }
            setupTimer();
            //setupTask();
        }
示例#4
0
    public static EyeXGazeTracking ConvertToEyeXGazeTracking(EyeXHost host, EyeXEngineStateValue <GazeTracking> state)
    {
        if (host.EngineVersion == null || (host.EngineVersion != null && host.EngineVersion.Major >= 1 && host.EngineVersion.Minor >= 4))
        {
            if (state == null || !state.IsValid || state.Value == 0)
            {
                return(EyeXGazeTracking.Unknown);
            }

            switch (state.Value)
            {
            // Gaze tracked?
            case GazeTracking.GazeTracked:
                return(EyeXGazeTracking.GazeTracked);

            // Gaze not tracked?
            case GazeTracking.GazeNotTracked:
                return(EyeXGazeTracking.GazeNotTracked);

            default:
                throw new InvalidOperationException("Unknown gaze tracking value.");
            }
        }
        return(EyeXGazeTracking.NotSupported);
    }
示例#5
0
 // Use this for initialization
 void Start()
 {
     _eyeXHost          = EyeXHost.GetInstance();
     _gazePointProvider = _eyeXHost.GetGazePointDataProvider
                              (Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
     _gazePointProvider.Start();
 }
示例#6
0
    void Awake()
    {
        eyexHost = EyeXHost.GetInstance();
        gazePointDataProvider   = eyexHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
        eyePositionDataProvider = eyexHost.GetEyePositionDataProvider();

        timeTillFirstDoorOpens    = 0.0f;       //9.0f;
        timeTillWallSoundStarts   = 0.0f;       //3.0f;
        timeTillWakeupSoundStarts = 0.0f;       //2.0f;
        timeEyesAreClosed         = 0.0f;
        blinkingLightCounter      = 0.0f;

        wakeupSoundPlayed             = false;
        openFirstDoorAnimationStarted = false;
        wallTriggerStarted            = false;
        wallSoundPlayed = false;


        // load the blinking lights
        blinkingLights = new ArrayList();
        blinkingLights.Add(GameObject.Find("Panel_Colored_01"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_02"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_03"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_04"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_05"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_06"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_07"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_08"));
        blinkingLights.Add(GameObject.Find("Panel_Colored_09"));
        currentBlinkingLightRemoved = false;

        Debug.Log("Awake: " + this.ToString());
    }
示例#7
0
 protected void Awake()
 {
     eyesClosedCounter = 0;
     _eyexHost         = EyeXHost.GetInstance();
     _dataProvider     = _eyexHost.GetEyePositionDataProvider();
     eyesOpenedQueue   = new Queue <EyesOpened> ();
 }
示例#8
0
 protected void Awake()
 {
     Debug.Log("awake");
     this.eyexHost        = EyeXHost.GetInstance();
     this.dataProvider    = eyexHost.GetEyePositionDataProvider();
     this.eyesOpenedQueue = new Queue <EyesOpened> ();
 }
示例#9
0
 void Start()
 {
     _eyexHost = EyeXHost.GetInstance();
     gaze = GetComponent<GazePointDataComponent>();
     _button = GetComponent<Button>();
     _rend = GetComponent<Image>();
 }
    public static EyeXGazeTracking ConvertToEyeXGazeTracking(EyeXHost host, EyeXEngineStateValue<GazeTracking> state)
    {
        if(host.EngineVersion == null || (host.EngineVersion != null && host.EngineVersion.Major >= 1 && host.EngineVersion.Minor >= 4))
        {
            if (state == null || !state.IsValid || state.Value == 0)
            {
                return EyeXGazeTracking.Unknown;
            }

            switch (state.Value)
            {
                // Gaze tracked?
                case GazeTracking.GazeTracked:
                    return EyeXGazeTracking.GazeTracked;

                // Gaze not tracked?
                case GazeTracking.GazeNotTracked:
                    return EyeXGazeTracking.GazeNotTracked;

                default:
                    throw new InvalidOperationException("Unknown gaze tracking value.");
            }
        }
        return EyeXGazeTracking.NotSupported;
    }
示例#11
0
 public TobiiGazeSource()
 {
     EyeXHost                  = new EyeXHost();
     GazePointDataStream       = EyeXHost.CreateGazePointDataStream(GazePointDataMode.Unfiltered);
     GazePointDataStream.Next += GazeData;
     EyeXHost.Start();
 }
示例#12
0
 void Start()
 {
     host   = EyeXHost.GetInstance();
     gaze   = host.GetGazePointDataProvider(Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
     player = gameObject.GetComponentInParent <PlayerController>();
     gaze.Start();
 }
示例#13
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;
    }
示例#14
0
文件: Gaze.cs 项目: feugy/alfred
        /// <summary>
        /// Detect EyeX engine presence, and starts it to get gaze positions
        /// </summary>
        /// <param name="fps">Number of gaze positions expected per second</param>
        /// <exception cref="Exception">If EyeX engine is not installed or running</exception>
        public Gaze(int fps)
        {
            this.interpolated = duration * fps / 1000;
            this.Position     = Cursor.Position;
            positions         = new Queue <Point>(interpolated);

            // simple check of EyeX presence
            switch (EyeXHost.EyeXAvailability)
            {
            case EyeXAvailability.NotAvailable:
                throw new Exception("Please install the EyeX Engine");

            case EyeXAvailability.NotRunning:
                throw new Exception("Please make sure that the EyeX Engine is started");
            }

            Engine = new EyeXHost();
            // track display size
            Engine.ScreenBoundsChanged += (object s, EngineStateValue <Rect> e) => displaySize = e.Value;;
            // track gaze position to set cursor on it
            gazeStream       = Engine.CreateFixationDataStream(FixationDataMode.Sensitive);
            gazeStream.Next += OnGazeChange;
            // start the EyeX engine
            Engine.Start();
            displaySize = Engine.ScreenBounds.Value;

            // start timer
            timer          = new System.Timers.Timer(duration / interpolated);
            timer.Enabled  = true;
            timer.Elapsed += OnTick;
        }
    protected virtual void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _interactorId = gameObject.GetInstanceID().ToString();

        _boxCollider = GetComponent<BoxCollider>();
    }
 public void StartTobiiEyex()
 {
     eyexHost = new EyeXHost();
     eyexHost.Start();
     AddVisionDataListener();
     SetDisplaySizeByScreen();
 }
 protected override IList <IEyeXBehavior> GetEyeXBehaviorsForGameObjectInteractor()
 {
     return(new List <IEyeXBehavior>(new[] { new EyeXActivatable(EyeXHost.GetInstance().ActivationHub)
                                             {
                                                 IsTentativeFocusEnabled = enableTentativeActivationFocus
                                             } }));
 }
示例#18
0
    private void Start()
    {
        _host = EyeXHost.GetInstance();
        _host.Start();

        _originalRunInBackgroundState = Application.runInBackground;
    }
示例#19
0
    void Awake()
    {
        eyexHost = EyeXHost.GetInstance();
        gazePointDataProvider   = eyexHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
        eyePositionDataProvider = eyexHost.GetEyePositionDataProvider();

        timeTillWallSoundStarts = 0.0f;         //3.0f;
        timeEyesAreClosed       = 0.0f;
        blinkingLightCounter    = 0.0f;

        wakeupSoundPlayed             = false;
        openFirstDoorAnimationStarted = false;
        wallTriggerStarted            = false;
        waitForEyeClose = false;

        // load the blinking lights
        blinkingLights = new ArrayList();
        blinkingLights.Add(GameObject.Find("Panel_01"));
        blinkingLights.Add(GameObject.Find("Panel_02"));
        blinkingLights.Add(GameObject.Find("Panel_03"));
        blinkingLights.Add(GameObject.Find("Panel_04"));
        blinkingLights.Add(GameObject.Find("Panel_05"));
        blinkingLights.Add(GameObject.Find("Panel_06"));

        // set a deafult name for lastGazedWallLightName
        this.lastGazedWallLightName = "";
    }
示例#20
0
        public void Start()
        {
            Host       = new EyeXHost();
            DataStream = Host.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);

            Host.Start();
            DataStream.Next += SimpanPosisiMata;
        }
示例#21
0
 public TobiiStreamPlayer()
 {
     eyeXHost = new EyeXHost();
     eyeXHost.Start();
     gazePoints   = new ConcurrentQueue <GazePointEventArgs>();
     fixations    = new ConcurrentQueue <FixationEventArgs>();
     eyePositions = new ConcurrentQueue <EyePositionEventArgs>();
 }
示例#22
0
    private bool showEyePosition = false;     //indicates whether the point indicating the eyeposition should be visible


    void Awake()
    {
        Debug.Log("EyePositionScript: Awake()");

        this.eyexHost = EyeXHost.GetInstance();
        this.gazePointDataProvider = eyexHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
        this.lastGazePoints        = new Queue <Vector2> ();
    }
示例#23
0
        public void Start()         //menyalakan Eyetracker dan mulai tracking
        {
            Host       = new EyeXHost();
            DataStream = Host.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);

            Host.Start();                               //mulai tracking mata
            DataStream.Next += SimpanPosisiMata;        //menyimpan data mata
        }
示例#24
0
    void Start()
    {
        host = EyeXHost.GetInstance();
        //eyePos = host.GetEyePositionDataProvider();
        gazePos = host.GetGazePointDataProvider(Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
        gazePos.Start();

        ResetHealth();
    }
示例#25
0
    public EyeXGazePointDataStream(EyeXHost host, EyeXGazePointType gazePointType)
    {
        _eyeXHost = host;
        _gazePointType = gazePointType;

        // create a global interactor for the data stream and register it with the EyeXHost.
        var interactor = new EyeXGlobalInteractor(InteractorId, AssignGazePointDataBehavior, HandleEvent);
        _eyeXHost.RegisterGlobalInteractor(interactor);
    }
示例#26
0
    public void Awake()
    {
        _eyeXHost          = EyeXHost.GetInstance();
        _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);

#if UNITY_EDITOR
        _oldGazePointMode = gazePointMode;
#endif
    }
示例#27
0
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);

        #if UNITY_EDITOR
        _oldFixationDataMode = fixationDataMode;
        #endif
    }
    public void Awake()
    {
        _eyeXHost             = EyeXHost.GetInstance();
        _fixationDataProvider = _eyeXHost.GetFixationDataProvider(fixationDataMode);

#if UNITY_EDITOR
        _oldFixationDataMode = fixationDataMode;
#endif
    }
示例#29
0
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();
        _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);

#if UNITY_EDITOR
        _oldGazePointMode = gazePointMode;
#endif
    }
示例#30
0
        public webBro()
        {
            InitializeComponent();
            InitBrowser();

            synth.SetOutputToDefaultAudioDevice();
            synth.SpeakCompleted += synth_SpeakCompleted;

            rgx = new Regex(pattern);

            try
            {
                defaultStyle    = File.ReadAllText(".\\Data\\style.css");
                monochromeStyle = File.ReadAllText(".\\Data\\monochrome.css");
                style           = defaultStyle;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            eyeXHost = new EyeXHost();
            eyeXHost.Start();
            stream       = eyeXHost.CreateGazePointDataStream(Tobii.EyeX.Framework.GazePointDataMode.Unfiltered);
            stream.Next += (s, e) =>
            {
                setPos((int)e.X, (int)e.Y);
            };
            position       = eyeXHost.CreateEyePositionDataStream();
            position.Next += (s, e) =>
            {
                leftClose  = e.LeftEye.X == 0 && e.LeftEye.Y == 0;
                rightClose = e.RightEye.X == 0 && e.RightEye.Y == 0;
            };

            controller = new Controller();
            listener   = new LeapEventListener(this);
            controller.AddListener(listener);

            if (File.Exists("parameters.cfg"))
            {
                StreamReader sr = new StreamReader("parameters.cfg");
                fingerMove.Checked = sr.ReadLine() == "1";
                keyCheck.Checked   = sr.ReadLine() == "1";
                borderLeft         = float.Parse(sr.ReadLine());
                borderUp           = float.Parse(sr.ReadLine());
                borderRight        = float.Parse(sr.ReadLine());
                borderDown         = float.Parse(sr.ReadLine());
                sr.Close();

                if (borderLeft != -200)
                {
                    firstLeap = false;
                }
            }
        }
示例#31
0
        private void canvasloaded(object sender, RoutedEventArgs e)
        {
            double          screenheight = this.ActualHeight - SystemParameters.WindowNonClientFrameThickness.Top - SystemParameters.WindowNonClientFrameThickness.Bottom;
            double          screenwidth  = this.ActualWidth - SystemParameters.WindowNonClientFrameThickness.Left - SystemParameters.WindowNonClientFrameThickness.Right;
            SolidColorBrush blankbg      = new SolidColorBrush(Colors.LightGray);
            SolidColorBrush handle       = new SolidColorBrush(Colors.Gray);

            #region vertical heatmap setup (N/A)
            List <byte[, ]> colors = new List <byte[, ]>(3);
            colors.Add(new byte[, ] {
                { 0, 0, 255 }
            });
            colors.Add(new byte[, ] {
                { 255, 0, 0 }
            });
            colors.Add(new byte[, ] {
                { 0, 255, 0 }
            });

            ImageBrush[]  verticalheatmaps = new ImageBrush[inputFile.Length];
            List <double> freqs            = new List <double>(inputFile.Length);

            /*
             * if (inputFile.Length > 0)
             * {
             *  for (int c = 0; c < (inputFile.Length > 3 ? 3 : inputFile.Length); c++)
             *  {
             *      Tuple<int, WriteableBitmap> vert = createVerticalHeatmap(200, 2 * (int)screenheight, yCoords[c], numCoords[c], 4330, 2 * 13, colors[c], 55);
             *      //Tuple<int, WriteableBitmap> vert = createMultiHeatmap(200, 2 * (int)screenheight, yCoords, numCoords, 4330, 2 * 13, colors, 55);
             *      verticalheatmaps[c] = new ImageBrush(vert.Item2);
             *      freqs.Add(vert.Item1);
             *  }
             *
             *  double maxfreq = freqs.Max();
             *  for (int c = 0; c < (inputFile.Length > 3 ? 3 : inputFile.Length); c++)
             *  {
             *      freqs[c] = freqs[c] / maxfreq;
             *  }
             * }
             */
            #endregion

            scrollbar = new Scrollbar(15, 150, screenheight, screenwidth, 0.9, 100, bg, blankbg, handle, verticalheatmaps, freqs, canv, 1, wb, heatmap, pixels3d, allColors);
            recorder  = new Recorder(20, 5, 100, canv, recordingpath);

            eyeXHost = new EyeXHost();
            eyeXHost.Start();
            var gazeData = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
            gazeData.Next += newGazePoint;

            /* Set up and start timer for recording gaze every 10 milliseconds */
            dispatcherTimer          = new System.Windows.Threading.DispatcherTimer(System.Windows.Threading.DispatcherPriority.Render);
            dispatcherTimer.Tick    += new EventHandler(update);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 10);
            dispatcherTimer.Start();
        }
    public TobiiInteractionEngineTracker()
    {
        _host = new EyeXHost();
        _host.Start();
        _lightlyFilteredGazePointDataProvider = _host.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
        _lightlyFilteredGazePointDataProvider.Next += NewGazePoint;

        AspectRatio = 16f / 9f;
        IsHeadTracking = false;
    }
        private void StartEyeStream()
        {
            _eyeXHost = new EyeXHost();
            _lightlyFilteredGazeDataStream = _eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
            _eyeXHost.Start();

            // Write the data to the console.
            _lightlyFilteredGazeDataStream.Next += gazeDataStreamNext;
            Console.WriteLine("Eyex setup");
        }
示例#34
0
        public EyeXDataCollector(DataType dataType, double instanceLength, String instanceClass)
        {
            this.dataType       = dataType;
            this.instanceLength = instanceLength;
            this.instanceClass  = instanceClass;

            collectedInstances = new List <Instance>();

            eyeXHost = new EyeXHost();
            eyeXHost.Start();
        }
示例#35
0
        private void InitEyeTracker()
        {
            // Initialize the EyeX Host
            _eyeXHost = new EyeXHost();
            _eyeXHost.Start();

            // Create a data stream object and listen to events.
            stream       = _eyeXHost.CreateGazePointDataStream(GazePointDataMode.Unfiltered);
            stream.Next += DrawCircleAtGazePoint;
            stream.Next += StoreGazePoint;
        }
示例#36
0
文件: Cockpit.cs 项目: etang4/GGJ2016
    private void Start()
    {
        _eyexHost = EyeXHost.GetInstance();

        _enemies = new List<Enemy>();
        _reticule = GameObject.Find("Reticule");
        _reticuleRenderer = _reticule.GetComponent<Renderer>();
        _gunFireRenderer = GameObject.Find("Gunfire").GetComponent<SpriteRenderer>();
        _gunFireParticleSystem = GameObject.Find("GunfireParticles").GetComponent<ParticleSystem>();
        _target = GameObject.Find("Target").GetComponent<MissileTargetIndicator>();
    }
示例#37
0
    private void Start()
    {
        _eyexHost = EyeXHost.GetInstance();

        _enemies               = new List <Enemy>();
        _reticule              = GameObject.Find("Reticule");
        _reticuleRenderer      = _reticule.GetComponent <Renderer>();
        _gunFireRenderer       = GameObject.Find("Gunfire").GetComponent <SpriteRenderer>();
        _gunFireParticleSystem = GameObject.Find("GunfireParticles").GetComponent <ParticleSystem>();
        _target = GameObject.Find("Target").GetComponent <MissileTargetIndicator>();
    }
    public void Awake()
    {
        ScenedataCapt = new sceneTrackdata();

        _eyeXHost          = EyeXHost.GetInstance();
        _gazePointProvider = _eyeXHost.GetGazePointDataProvider(gazePointMode);

#if UNITY_EDITOR
        _oldGazePointMode = gazePointMode;
#endif
    }
示例#39
0
        public Gta5EyeTracking()
        {
            _aspectRatio = 1;
            _host        = new EyeXHost();
            _host.Start();
            _lightlyFilteredGazePointDataProvider       = _host.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
            _lightlyFilteredGazePointDataProvider.Next += NewGazePoint;

            _menuPool = new MenuPool();

            LoadSettings();
            _settingsMenu = new SettingsMenu(_menuPool, _settings);
            _settingsMenu.DeadzoneMenu.OnItemSelect += (m, item, indx) =>
            {
                if (indx == 0)
                {
                    _isDrawingDeadzone = true;
                }
                else
                {
                    _settings.Deadzones.RemoveAt(indx - 1);
                    _settingsMenu.DeadzoneMenu.RemoveItemAt(indx);
                    _settingsMenu.DeadzoneMenu.RefreshIndex();
                }
            };

            _gazeVisualization = new GazeVisualization();
            _debugOutput       = new DebugOutput();

            _aiming = new Aiming(_settings);

            _mouseEmulation      = new MouseEmulation();
            _controllerEmulation = new ControllerEmulation();
            _controllerEmulation.OnModifyState += OnModifyControllerState;
            _freelook = new Freelook(_controllerEmulation, _mouseEmulation, _settings);
            _pedestrianInteraction = new PedestrianInteraction();
            _radialMenu            = new RadialMenu(_controllerEmulation);

            _gazeStopwatch = new Stopwatch();
            _gazeStopwatch.Restart();

            _tickStopwatch = new Stopwatch();

            _foregroundWindowWatcher = new ForegroundWindowWatcher();
            _foregroundWindowWatcher.ForegroundWindowChanged += ForegroundWindowWatcherOnForegroundWindowChanged;
            _isWindowForeground = _foregroundWindowWatcher.IsWindowForeground();

            View.MenuTransitions = true;

            KeyDown += OnKeyDown;

            Tick += OnTick;
        }
示例#40
0
        public static void Main(string[] args)
        {
            using (var eyeXHost = new EyeXHost())
            {
                Run(eyeXHost);
            }

            Console.ResetColor();
            Console.WriteLine();
            Console.WriteLine("Press ANY key to quit");
            Console.ReadKey(true);
        }
    /// <summary>
    /// Initialize EyeX host and game menu on Awake
    /// </summary>
    public void Awake()
    {
        _eyeXHost = EyeXHost.GetInstance();

        _gameMenu = GameObject.Find("Game Menu").GetComponent<GameMenu>();

        // add all GUITextures under game menu to the list of menu items
        foreach (Transform childTransform in transform)
        {
            _menuItems.Add(childTransform);
        }
    }
        public override void OnEnter()
        {
            _eyexHost = EyeXHost.GetInstance();

            _isPresent = GetIsPresent();
            isPresent.Value = _isPresent;

            CheckForPresence();

            if (!everyFrame)
            {
                Finish();
            }
        }
示例#43
0
    /// <summary>
    /// Gets the singleton EyeXHost instance.
    /// Users of this class should store a reference to the singleton instance in their Awake() method, or similar.
    /// </summary>
    /// <returns>The instance.</returns>
    public static EyeXHost GetInstance()
    {
        if (_instance == null)
        {
            // create a game object with a new instance of this class attached as a component.
            // (there's no need to keep a reference to the game object, because game objects are not garbage collected.)
            print("Creating new EyeXHost instance.");
            var container = new GameObject();
            container.name = "EyeXHostContainer";
            DontDestroyOnLoad(container);
            _instance = container.AddComponent(typeof(EyeXHost)) as EyeXHost;
        }

        return _instance;
    }
示例#44
0
	// Use this for initialization
	void Start ()
    {
		_eyeXHost = EyeXHost.GetInstance ();
		_gazePointProvider = _eyeXHost.GetGazePointDataProvider (Tobii.EyeX.Framework.GazePointDataMode.LightlyFiltered);
		onEnable ();
        _tr = transform;
        GameObject[] _tempCalStats = GameObject.FindGameObjectsWithTag("Stats");
        if (_tempCalStats.Length > 1)
        {
            for (int i = 1; i < _tempCalStats.Length; i++)
            {
                Destroy(_tempCalStats[i]);
            }
        }

        _calStats = _tempCalStats[0].GetComponent<CalibrationStats>();
        _calStats._calibrationSize = 0;
	}
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetFixationDataProvider(fixationDataMode);
 }
示例#46
0
 //START FUNCTION
 void Start()
 {
     _eyexHost = EyeXHost.GetInstance();
 }
    public void Dispose()
    {
        if (_lightlyFilteredGazePointDataProvider != null)
        {
            _lightlyFilteredGazePointDataProvider.Next -= NewGazePoint;
            _lightlyFilteredGazePointDataProvider.Dispose();
            _lightlyFilteredGazePointDataProvider = null;
        }

        if (_host != null)
        {
            _host.Dispose();
            _host = null;
        }
    }
示例#48
0
 private void Start () 
 {
     _host = EyeXHost.GetInstance();
     _host.Start();
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetGazePointDataProvider(gazePointDataMode);
 }
示例#50
0
 void Start()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _gazePointDataComponent = GetComponent<GazePointDataComponent>();
     _rendererComponent = GetComponent<Renderer>();
 }
示例#51
0
 public void Awake()
 {
     _eyeXHost = EyeXHost.GetInstance();
 }
 public void Awake()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _interactorId = gameObject.GetInstanceID().ToString();
 }
 protected void Awake()
 {
     _eyexHost = EyeXHost.GetInstance();
     _dataProvider = _eyexHost.GetEyePositionDataProvider();
 }
示例#54
0
	// Use this for initialization
	void Start () {
		gaze = GetComponent<GazePointDataComponent>();
		_eyexHost = EyeXHost.GetInstance();
	}
示例#55
0
 // Use this for initialization
 void Awake()
 {
     Invoke("spawnFirefly", 10f);
     _eyexHost = EyeXHost.GetInstance();
 }
示例#56
0
 public void Awake()
 {
     _eyeXHost = EyeXHost.GetInstance();
     _gazePointProvider = _eyeXHost.GetGazePointDataProvider(GazePointDataMode.LightlyFiltered);
 }