Пример #1
0
    void Start()
    {
        experimentManagerRef = GameObject.Find("ExperimentManager");
        m_ExpTrial           = experimentManagerRef.GetComponent <ExpTrial>();

        coherenceNumRR = m_ExpTrial.targetNum * 2;     // start at 50% coherent motion
        coherenceNumLL = m_ExpTrial.targetNum * 2;     // start at 50% coherent motion
        coherenceNumRL = m_ExpTrial.targetNum * 2;     // start at 50% coherent motion
        coherenceNumLR = m_ExpTrial.targetNum * 2;     // start at 50% coherent motion
    }
    void Start()
    {
        // Setup script references
        m_ExpSetup      = this.GetComponent <ExpSetup>();
        m_ExpCue        = this.GetComponent <ExpCue>();
        m_ExpPeripheral = this.GetComponent <ExpPeripheral>();
        m_ExpTrial      = this.GetComponent <ExpTrial>();

        m_TrialInfoData  = this.GetComponent <TrialInfoData>();
        m_FlickerManager = this.GetComponent <FlickerManager>();

        // Setup peripheral display references
        occluderRef.AddRange(GameObject.FindGameObjectsWithTag("Occluder"));
        peripheralDisplayRef = GameObject.Find("Peripheral Display");
        m_SpawnPeriperal     = peripheralDisplayRef.GetComponent <SpawnPeripheral>();

        // Setup fixation gameobject reference
        fixationObjectRef = GameObject.Find("FixationCross");

        // Setup trial counter references
        trialCounterRef = GameObject.Find("TrialCounter");
        m_TrialNumber   = trialCounterRef.GetComponent <TrialNumber>();
        trialCounterRef.SetActive(false);                           // hide trial counter

        // Setup input field references
        inputGameobjectRef = GameObject.Find("InputField");
        inputGameobjectRef.SetActive(false);                        // hide text input field

        // Setup feedback references
        feedbackGameobjectRef = GameObject.Find("Feedback");
        feedbackGameobjectRef.SetActive(false);                     // hide feedback object

        // Setup instruction references
        instructionsRef = GameObject.Find("Instructions");

        // Setup coherence manager references
        coherenceManagerRef = GameObject.Find("CoherenceManager");
        if (coherenceManagerRef != null)
        {
            m_AdjustCoherence = coherenceManagerRef.GetComponent <AdjustCoherence>();
        }

        // Adjust coherence level for current subject using calibration data
        //if (adjustCoherence)
        //    totalNum = m_AdjustCoherence.coherenceNum;
    }
 void Start()
 {
     experimentManagerRef = GameObject.Find("ExperimentManager");           // access the ExperimentManager gameobject
     m_ExpTrial           = experimentManagerRef.GetComponent <ExpTrial>(); // access the ExpTrial script on ExperimentManager
 }