Esempio n. 1
0
    // overrides

    void Start()
    {
        _orientation = GetComponent <OrientationTask>();
        _orientation.BlockFinished += onOrientationBlockFinished;
        _orientation.Cancelled     += onOrientationTrialCancelled;

        _playingLady = GetComponent <PlayingLadyTask>();
        _playingLady.BlockFinished += onPlayingLadyBlockFinished;
        _playingLady.Cancelled     += onPlayingLadyTrialCancelled;

        _hrClient = GetComponent <HRClient>();
        _log      = GetComponent <Log>();

        _socialVideos = GetComponent <SocialVideos>();

        _gazePoint = FindObjectOfType <GazePoint>();

        _gazeClient         = FindObjectOfType <GazeClient>();
        _gazeClient.Start  += onGazeClientStart;
        _gazeClient.Sample += onGazeClientSample;

        baselinePlayer.loopPointReached    += onBaselineStopped;
        socialVideoPlayer.loopPointReached += onSocialVideoStopped;

        FillParticipantIDs();
    }
Esempio n. 2
0
    // overrides
    void Start()
    {
        var now  = DateTime.Now;
        var date = String.Join("-", (new int[] { now.Year, now.Month, now.Day }).Select(num => Pad(num, 2)));
        var time = String.Join("-", (new int[] { now.Hour, now.Minute, now.Second }).Select(num => Pad(num, 2)));

        _writer = new StreamWriter($"log/log_{date}_{time}.txt");

        _gazeClient         = FindObjectOfType <GazeClient>();
        _gazeClient.Sample += onGazeSample;

        _netStation = FindObjectOfType <NetStation>();
    }
    // overrides

    void Start()
    {
        _debug = FindObjectOfType <DebugDesk>();

        _id = Random.Range(0, int.MaxValue);

        _spotlight = GetComponentInChildren <Light>();

        if (!isLocalPlayer)
        {
            return;
        }

        _gazeClient         = FindObjectOfType <GazeClient>();
        _gazeClient.State  += onGazeClientStateChanged;
        _gazeClient.Sample += onGazeClientNewSample;
    }
Esempio n. 4
0
    // overrides

    void Start()
    {
        _debug = FindObjectOfType <DebugDesk>();

        _infoDockOverlay         = GetComponent <Canvas>();
        _infoDockOverlay.enabled = false;

        _message = message.GetComponentInChildren <Text>();
        message.SetActive(false);

        _keyInfo = FindObjectsOfType <RawImage>()
                   .Where(image => image.tag == "key-info")
                   .ToArray();

        GazeClient gazeClient = FindObjectOfType <GazeClient>();

        if (gazeClient != null)
        {
            gazeClient.GameStart += onGameStart;
            gazeClient.GameStop  += onGameStop;
        }
    }
Esempio n. 5
0
    // overrides

    void Start()
    {
        _debug = FindObjectOfType <DebugDesk>();

        _gazeClient = FindObjectOfType <GazeClient>();
    }
Esempio n. 6
0
    // overrides

    void Start()
    {
        _gazeClient = FindObjectOfType <GazeClient>();
    }
Esempio n. 7
0
    // overrides

    void Start()
    {
        _gaze         = FindObjectOfType <GazeClient>();
        _gaze.Sample += onSample;
    }