public TrialController(int theTrialId, TargetBehaviour initialTarget, TargetBehaviour finalTarget, ITrialListener theListener, CursorBehaviour theCursor, TrialMeasurements lastTrial)
 {
     this.trialId       = theTrialId;
     this.initialTarget = initialTarget;
     this.finalTarget   = finalTarget;
     this.listener      = theListener;
     this.cursor        = theCursor;
     _lastTrial         = lastTrial;
     InitializeTrial();
 }
Exemplo n.º 2
0
 public TappingTrialController(int theTrialId, TargetBehaviour initialTarget, TargetBehaviour finalTarget, ITrialListener theListener, CursorBehaviour theCursor, TrialMeasurements lastTrial)
     : base(theTrialId, initialTarget, finalTarget, theListener, theCursor, lastTrial)
 {
 }
Exemplo n.º 3
0
    public DragTestController(int theTrialId, TargetBehaviour initialTarget, TargetBehaviour finalTarget, ITrialListener theListener, CursorBehaviour theCursor, TrialMeasurements lastTrial)
        : base(theTrialId, initialTarget, finalTarget, theListener, theCursor, lastTrial)
    {
        draggableObject = Object.Instantiate(initialTarget.gameObject);

        var targetBehaviour = draggableObject.GetComponent <TargetBehaviour>();

        targetBehaviour.UnhighlightTarget();
        targetBehaviour.SetAsDraggableTarget();
        Object.Destroy(targetBehaviour);

        draggableObject.transform.SetParent(cursor.transform);
        draggableObject.transform.localPosition = Vector3.zero;
        draggableObject.SetActive(false);
    }
 public virtual void AbortTrial()
 {
     cursor.RemoveListener(this);
     listener = null;
 }