Exemple #1
0
 /// <summary>
 /// Unity Event Awake.
 /// </summary>
 private void Awake()
 {
     if (null == instance)
     {
         instance = this;
     }
     else if (this != instance)
     {
         DestroyImmediate(gameObject);
     }
 }
Exemple #2
0
    // Start is called before the first frame update
    void Start()
    {
        touchControllerObject = GameObject.FindGameObjectWithTag("TouchController");
        touchController       = touchControllerObject.GetComponent <TouchInputController>();

        filePathPositionLogger = getPathForPositionLogger();
        File.AppendAllText(filePathPositionLogger, "date, time, id , flexibility, size, itemCount, round, count, PosX, PosY, PosFrmCntrX, PosFrmCntrY, DistFrmCntr, Angle, selection, target, success, timeTaken \n");
        if (!System.IO.File.Exists(Application.dataPath + "/Data/" + "Participant_PositionData" + touchController.participant + ".csv"))
        {
            File.WriteAllText(Application.dataPath + "/Data/" + "Participant_PositionData" + touchController.participant + ".csv", "");
        }
    }
Exemple #3
0
    void Start()
    {
        touchControllerObject = GameObject.FindGameObjectWithTag("TouchController");
        touchController       = touchControllerObject.GetComponent <TouchInputController>();

        sp.Open();
        sp.ReadTimeout = 1;
        sp.DtrEnable   = true;
        //sampleThread = new Thread(new ThreadStart(SampleFunction));
        // sampleThread.IsBackground = true;
        //sampleThread.Start();
    }
Exemple #4
0
    // Start is called before the first frame update
    void Start()
    {
        pieItem                  = GameObject.Find("Item");
        pieImage                 = GameObject.Find("Item").GetComponent <Image>();
        pieImage.color           = new Vector4(1, 0, 0, 0.55f);
        selectedMovingTextObject = GameObject.FindGameObjectWithTag("selectedTextObject");
        pieTarget                = GameObject.Find("Target");
        imageTarget              = GameObject.Find("Target").GetComponent <Image>();
        imageTarget.color        = new Vector4(0, 1, 0, 0.30f);


        touchControllerObject = GameObject.FindGameObjectWithTag("TouchController");
        touchController       = touchControllerObject.GetComponent <TouchInputController>();

        filePath = getPath();
        File.AppendAllText(filePath, "date, time, id , flexibility, sensitivity, size, itemCount, round, count, selection, target, success, timeTaken, \n");

        targetCircle    = GameObject.FindGameObjectWithTag("TargetCircle");
        dockingCircle   = GameObject.FindGameObjectWithTag("DockingCircle");
        referenceCircle = GameObject.FindGameObjectWithTag("ReferenceCircle");
        dockingObject   = GameObject.Find("DockingObject");
        referenceCircle.transform.position = dockingCircle.transform.position;
    }
 void Start()
 {
     TouchCamera = transform.GetComponent <MobileTouchCamera>();
     touch       = transform.GetComponent <TouchInputController>();
     //TouchCamera.EnableRotation = true;
 }