Esempio n. 1
0
        public void Pause()
        {
            IsPlaying = false;
            _EyeGazeVisualizer.PauseApp();

            if (_HeadGazeVisualizer != null)
            {
                _HeadGazeVisualizer.PauseApp();
            }
        }
Esempio n. 2
0
        private void ShowAllAndFreeze(InputPointerVisualizer visualizer, InputSourceType iType)
        {
            if (visualizer != null)
            {
                visualizer.gameObject.SetActive(true);

#if UNITY_EDITOR
                Load();
#elif WINDOWS_UWP
                txt_LoadingUpdate.text = "[Load.2] " + FileName;
                bool result = AsyncHelpers.RunSync <bool>(() => UWP_Load());
                txt_LoadingUpdate.text = "[Load.2] Done. ";
#endif
                txt_LoadingUpdate.text = "Loading done. Visualize data...";

                // Let's unpause the visualizer to make updates
                visualizer.UnpauseApp();

                // Let's make sure that the visualizer will show all data at once
                visualizer.AmountOfSamples = loggedLines.Count;

                // Now let's populate the visualizer
                for (int i = 0; i < loggedLines.Count; i++)
                {
                    string[] split = loggedLines[i].Split(new char[] { ',' });
                    if (iType == InputSourceType.Eyes)
                    {
                        UpdateEyeGazeSignal(split, visualizer);
                    }

                    if (iType == InputSourceType.Head)
                    {
                        UpdateHeadGazeSignal(split, visualizer);
                    }
                }
                visualizer.PauseApp();
            }
        }