void Process_Input() { if (Input.GetKeyDown(KeyCode.S) && ctrl_status == Ctrl_STATUS.WAITING) { Start_Trial(); ctrl_status = Ctrl_STATUS.RUNNING; InvokeRepeating("Write_Data", 0, 1 / sample_rate); } if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } if (Input.GetKeyDown(KeyCode.I)) { show_gaze_cursor = !show_gaze_cursor; gaze_cursor.GetComponent <Camera_Facing_Sprite>().amActive = show_gaze_cursor; } for (int i = 0; i < usrTags.Length; i++) { if (Input.GetKey(usrTags[i].input)) { usrTagBools[i] = true; } else { usrTagBools[i] = false; } } }
public void Finish_Configuration() { cam = GetComponent <Experiment_Config>().Instantiate_SMI(); GameObject.Find("Menu").SetActive(false); GameObject.Destroy(UI_Cam); Start_Experiment(); ctrl_status = Ctrl_STATUS.WAITING; }
void Start_Configuration() { ctrl_status = Ctrl_STATUS.CONFIG; UI_Cam = new GameObject("UI_Camera"); UI_Cam.AddComponent <Camera>(); UI_Cam.GetComponent <Camera>().backgroundColor = Color.black; GameObject.Find("Experiment_UI").GetComponent <Canvas>().worldCamera = UI_Cam.GetComponent <Camera>(); GameObject.Find("Menu").GetComponent <Canvas>().worldCamera = UI_Cam.GetComponent <Camera>(); }