Exemplo n.º 1
0
    private void GestureRecognizer_TappedEvent(UnityEngine.XR.WSA.Input.InteractionSourceKind source, int tapCount, Ray headRay)
    {
        if (focusedObject != null)
        {
            focusedObject.SendMessage("OnSelect");
#if WINDOWS_UWP
            if (dataRecorder)
            {
                dataRecorder.QueueMessage(focusedObject.name + ";OnSelect");
            }
#endif
            //sw.WriteLine(focusedObject.name + " OnSelect");
        }
        //UNCOMMENT THIS FOR GAZE MARKER
        else if (brainParts != null)
        {
            brainParts.SendMessage("OnEmptyTap");
#if WINDOWS_UWP
            if (dataRecorder)
            {
                dataRecorder.QueueMessage("BrainParts;OnEmptyTap");
            }
#endif
            //sw.WriteLine("BrainParts OnEmptyTap");
        }
    }
Exemplo n.º 2
0
 protected override Action Command()
 {
     return(delegate
     {
         if (dataRecorder != null)
         {
             dataRecorder.QueueMessage(gameObject.name + " click");
         }
         else
         {
             Debug.Log("data recorder null, not recording click on " + gameObject.name);
         }
     });
 }
Exemplo n.º 3
0
 private void Update()
 {
     //want to make recording interval adjustable
     if (recorder != null)
     {
         recorder.QueueMessage(gameObject.name + ";" + gameObject.transform.position.ToString("F3") + ";" + gameObject.transform.rotation.ToString("F3"));
     }
 }