예제 #1
0
    // Use this for initialization
    void Start()
    {
        leftStart = new Vector3(999.752f, 0.96305f, 1000.09f);
        leftEnd   = new Vector3(999.767f, 1.29232f, 1000.349f);

        rightStart = new Vector3(1000.303f, 0.96305f, 1000.09f);
        rightEnd   = new Vector3(1000.318f, 1.29232f, 1000.349f);

        leftTarget  = GameObject.Find("InputTarget_L");
        rightTarget = GameObject.Find("InputTarget_R");

        leftHand  = GameObject.Find("Hand_L");
        rightHand = GameObject.Find("Hand_R");

        leftHandClose  = false;
        rightHandClose = false;

        leftHandAnimate  = false;
        rightHandAnimate = false;

        leftMove  = false;
        rightMove = false;

        leftPercentage  = 20f;
        rightPercentage = 20f;

        leftTarget.transform.position  = leftStart;
        rightTarget.transform.position = rightStart;

        comm = new AssemblyCSharp.MotorComm();
        comm.setupExperiment();

        comm.TR     = 1.0f;
        tryInterval = comm.TR / 5f;
        timeCounter = 0;

        armTryInterval = comm.TR / 5f;
        armTimeCounter = 0;

        handTryInterval = comm.TR / 10f;
        handTimeCounter = 0;
    }
    // Use this for initialization
    void Start()
    {
        leftStart = new Vector3 (999.752f, 0.96305f, 1000.09f );
        leftEnd = new Vector3 (999.767f, 1.29232f, 1000.349f );

        rightStart = new Vector3 (1000.303f, 0.96305f, 1000.09f );
        rightEnd = new Vector3 (1000.318f, 1.29232f, 1000.349f );

        leftTarget = GameObject.Find("InputTarget_L");
        rightTarget = GameObject.Find("InputTarget_R");

        leftHand = GameObject.Find("Hand_L");
        rightHand = GameObject.Find("Hand_R");

        tryInterval = TR  / 5f;
        timeCounter = 0;

        armTryInterval = TR / 5f;
        armTimeCounter = 0;

        handTryInterval = TR / 10f;
        handTimeCounter = 0;

        leftHandClose = false;
        rightHandClose = false;

        leftHandAnimate = false;
        rightHandAnimate = false;

        leftMove = false;
        rightMove = false;

        leftPercentage = 20f;
        rightPercentage = 20f;

        leftTarget.transform.position = leftStart;
        rightTarget.transform.position = rightStart;

        comm = new AssemblyCSharp.MotorComm();
        comm.setupConnection(HostData, Port);

        comm.addConfigurationPair ("MNIMask", "studydirhmat_spm_final.nii");
        comm.addConfigurationPair ("MNITemplate", "studydirMNI152_T1_1mm_brain.nii.gz");
        comm.addConfigurationPair ("Prefix", "outputdirRUN01" + Path.DirectorySeparatorChar + "DRIN-");
        comm.addConfigurationPair ("ActivationLevel", "0.01");
        comm.addConfigurationPair ("CurrentRunSuffix", "RUN01");

        comm.setRunsize (296);
    }