void OnEnable() { followCameraCanvas.SetActive(true); controllerHelper = GameObject.Find("ControllerHelper"); controllerHelper.SetActive(false); focus = GameObject.Find("focus").GetComponent <Text>(); worcol = GameObject.Find("worcol").GetComponent <Text>(); phaseText = GameObject.Find("PhaseText").GetComponent <Text>(); selectables = new GameObject[6]; selectables[0] = GameObject.Find("Blue"); selectables[1] = GameObject.Find("Red"); selectables[2] = GameObject.Find("Green"); selectables[3] = GameObject.Find("Yellow"); selectables[4] = GameObject.Find("Orange"); selectables[5] = GameObject.Find("Purple"); pauseTimer = GameObject.Find("PauseTimer").GetComponent <Text>(); numRight = GameObject.Find("numRight").GetComponent <Text>(); numWrong = GameObject.Find("numWrong").GetComponent <Text>(); pauseTimer.gameObject.SetActive(false); target = selectables[0]; //subjectID = SaveInfo.GetID(); roomIdx = SaveInfo.GetRoom(); //language = SaveInfo.GetLanguage(); Localize.SetCurrentLanguage(SaveInfo.GetLanguage()); //SetArrayLanguage(language); stroopTaskManager = new StroopTask(SaveInfo.GetLanguage(), SaveInfo.GetID()); //path = SaveInfo.performancePath; time = startTime; startTime = 5.2f; timeFactor = 0.2f; hurtPanel = GameObject.Find("Hurt"); hurtPanel.SetActive(false); timer = GameObject.Find("timer").GetComponent <Text>(); scoreWrong = GameObject.Find("ScoreWrong").GetComponent <Text>(); scoreRight = GameObject.Find("ScoreRight").GetComponent <Text>(); timebar = GameObject.Find("Timebar").GetComponent <Image>(); trackedObject = RightController.GetComponent <SteamVR_TrackedObject>(); head = GameObject.Find("Camera (eye)"); //Random.InitState(subjectID); Debug.Log("SubjectId: " + SaveInfo.GetID() + " RoomZero"); }
void OnEnable() { followCameraCanvas.SetActive(true); controllerHelper = GameObject.Find("ControllerHelper"); controllerHelper.SetActive(false); focus = GameObject.Find("focus").GetComponent <Text>(); worcol = GameObject.Find("worcol").GetComponent <Text>(); phaseText = GameObject.Find("PhaseText").GetComponent <Text>(); selectables = new GameObject[6]; selectables[0] = GameObject.Find("Blue"); selectables[1] = GameObject.Find("Red"); selectables[2] = GameObject.Find("Green"); selectables[3] = GameObject.Find("Yellow"); selectables[4] = GameObject.Find("Orange"); selectables[5] = GameObject.Find("Purple"); pauseTimer = GameObject.Find("PauseTimer").GetComponent <Text>(); numRight = GameObject.Find("numRight").GetComponent <Text>(); numWrong = GameObject.Find("numWrong").GetComponent <Text>(); pauseTimer.gameObject.SetActive(false); target = selectables[0]; //subjectID = SaveInfo.GetID(); roomIdx = SaveInfo.GetRoom(); Localize.SetCurrentLanguage(SaveInfo.GetLanguage()); stroopTaskManager = new StroopTask(SaveInfo.GetLanguage(), SaveInfo.GetID()); time = startTime; startTime = 5.2f; timeFactor = 0.2f; hurtPanel = GameObject.Find("Hurt"); hurtPanel.SetActive(false); timer = GameObject.Find("timer").GetComponent <Text>(); scoreWrong = GameObject.Find("ScoreWrong").GetComponent <Text>(); scoreRight = GameObject.Find("ScoreRight").GetComponent <Text>(); timebar = GameObject.Find("Timebar").GetComponent <Image>(); //RoomA Variables minTime = 3.0f; lessTime = 0.5f; countStimuli = 0; //RoomB Variables room = GameObject.Find("Walls"); colorWalls = GameObject.Find("Selectables"); // ceiling = GameObject.Find("Ceiling"); scaleWalls = 1.0f; // ceilingHeight = ceiling.transform.position.y; minScale = 0.2f; // minHeight = ceilingHeight * 0.5f; scaleFactorWalls = (scaleWalls - minScale) / 4.0f; // ceilingHeightFactor = (ceilingHeight - minHeight) / 4.0f; // ceilingHeightFactor = 0.0f; // Debug.Log("OnEnable: ceiligHeight: " + ceilingHeight + ", ceilingHeightFactor: " + ceilingHeightFactor); head = GameObject.Find("Camera (eye)"); trackedObject = RightController.GetComponent <SteamVR_TrackedObject>(); //Random.InitState(subjectID); Debug.Log("SubjectId: " + SaveInfo.GetID() + "RoomB"); }