void Start() { // Get the hand componenet //hand = GetComponent<Hand>(); wim = GameObject.Find("InteractionCenter").GetComponent <WIM_vive>(); pm = GameObject.Find("InteractionCenter").GetComponent <PositionManager>(); hand = hand1; released = true; }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StudyManager").GetComponent <StudyManager>(); pm = gameObject.GetComponent <PositionManager>(); startscreen = GameObject.Find("StartText").GetComponent <Text>(); t4 = new string[, ] { { "m", "1" }, { "r", "2" }, { "s", "3" }, { "r", "1" }, { "s", "2" }, { "m", "3" } }; linePositions = new List <Vector3>(); sphere = GameObject.Find("Small Sphere"); lr = sphere.AddComponent <LineRenderer>(); lr.material = new Material(Shader.Find("Sprites/Default")); lr.material.SetColor("_Color", Color.green); lr.widthMultiplier = 0.01f; lr.positionCount = 0; //var b = GameObject.Find("targetBuildings"); for (int i = 0; i < modelObjects.transform.childCount; i++) { modelObjects.transform.GetChild(i).gameObject.SetActive(false); targetPlacement.transform.GetChild(i).gameObject.SetActive(false); } for (int i = 0; i < targetPlacementt5.transform.childCount; i++) { targetPlacementt5.transform.GetChild(i).gameObject.SetActive(false); modelObjectst5.transform.GetChild(i).gameObject.SetActive(false); } //text = GameObject.Find("t").GetComponent<Text>(); originalColor = targetPlacementt5.transform.GetChild(0).GetComponent <Renderer>().material.GetColor("_Color"); while (File.Exists("Assets/Logs/participant" + participant + ".txt")) { participant++; } StreamWriter writer = new StreamWriter("Assets/Logs/participant" + participant + ".txt", false); writer.WriteLine("participant,task,subtask,time_since_start,accuracy,accuracyrot,accuracyscale,overall_time,mode,is_end,exited,controller"); writer.Close(); icenter = gameObject.GetComponent <WIM_vive>(); acc = new float[sm.t1_contr.GetLength(1), targetPlacementt5.transform.childCount *2, 3]; times = new float[sm.t1_contr.GetLength(1), targetPlacementt5.transform.childCount *2]; }
// Start is called before the first frame update void Start() { tm = GameObject.Find("InteractionCenter").GetComponent <TaskManager_vive>(); pm = GameObject.Find("InteractionCenter").GetComponent <PositionManager>(); wim = GameObject.Find("InteractionCenter").GetComponent <WIM_vive>(); tt = gameObject.GetComponent <TTSUnityWin>(); participant = tm.getParticipant(); subtask_order_task_rocks = new int[] { 0, 1, 2, 3, 0, 1, 2, 3, }; subtask_order_task_puzzle = new int[] { 0, 1, 2, 3, 0, 1, 2, 3 }; //subtask_order_task_rocks = new int[] { // 0 //}; //subtask_order_task_puzzle = new int[] { // 0 //}; canv.SetActive(false); t1_contr = new PositionManager.controllerEnum[, ] { { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, }; t2_contr = new PositionManager.controllerEnum[, ] { { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball }, { PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller }, { PositionManager.controllerEnum.controller, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.sphere }, { PositionManager.controllerEnum.sphere, PositionManager.controllerEnum.controller_menu, PositionManager.controllerEnum.controller_arcball, PositionManager.controllerEnum.controller }, }; }