// Use this for initialization void Awake() { container = GameObject.FindGameObjectWithTag("Intermission screen"); screen = GameObject.FindGameObjectWithTag("screen"); myRDWController = GameObject.FindGameObjectWithTag("Experiment controller").GetComponent <RDWController>(); screen.transform.GetComponent <Renderer>().material.color = new Color(0, 0, 0, 1); // Set screen to black on startup }
void Awake() { trackedObj = GetComponent <SteamVR_TrackedObject>(); myRDWController = GameObject.FindGameObjectWithTag("Experiment controller").GetComponent <RDWController>(); response = 0; Debug.Log(myRDWController.controllerInput.response); }
/// <summary> /// Set up the distractor at the start of each trial /// </summary> /// <param name="distractorPresent">If the trial will have a distractor or not</param> /// <param name="distractorDirection">The direction the distractor will walk</param> /// <param name="rotationDirection">The direction the participant will turn</param> public void Initialize(bool distractorPresent, int distractorDirection, int rotationDirection) { myRDWController = GameObject.FindGameObjectWithTag("Experiment controller").GetComponent <RDWController>(); gameObject.SetActive(true); transform.forward = myRDWController.targetTransform.forward; timeCounter = 0.0f; SetStartingPosition(distractorPresent, distractorDirection, rotationDirection); initialized = true; }