void Start() { QualitySettings.vSyncCount = 0; Application.targetFrameRate = CommonUtils.frameRate; // Call all the functions to setup the environment SetupBackgroundColor(); SetupIndicatorSize(); SetupInterTrialTime(); SetupCollisionTime(); SetupTargetTimeout(); SetupNumberOfTrials(); SetupTargetSize(); SetupAnimalName(); SetupLickToReward(); SetupWhiteNoise(); SetupLaser(); // Print the configuration, if needed PrintStartingConfiguration(); // Retrieve a reference for the scripts, starting from the GameObjects of the scene sensorScript = Sensor.GetComponentInChildren <SensorScript>(); targetScript = Target.GetComponentInChildren <VGOTarget>(); // Init a new DataCollector dc = new DataCollector { taskName = "Habituation", AnimalName = animalName }; // Start a thread the waits for the user to start the experiment StartCoroutine(WaitForStart()); }
void Start() { gameManager = GameObject.Find("GameManager").GetComponent <GameManager>().GetGameManager(); rb = GetComponent <Rigidbody2D>(); sensorInfo = sensor.GetComponent <SensorScript>(); playerMaterial = GetComponent <SpriteRenderer>().material; playerMaterial.SetVector("_Color", playerInfo.playerColor); }
// Use this for initialization void Start() { QualitySettings.vSyncCount = 0; Application.targetFrameRate = CommonUtils.frameRate; // Call all the functions to setup the environment SetupIsFlat(); SetupBackgroundColor(); SetupInterTrialTime(); SetupTargetSize(); SetupAnimalName(); SetupLickToReward(); SetupWhiteNoise(); SetupCueRewardDelay(); SetupWnCueDelay(); SetupNumberOfTrials(); SetupTargets(); SetupLaser(); // Print the configuration, if needed PrintStartingConfiguration(); // Retrieve a reference for the scripts, starting from the GameObjects of the scene Sensor.GetComponentInChildren <Renderer>().receiveShadows = false; sensorScript = Sensor.GetComponentInChildren <SensorScript>(); // Init a new DataCollector dc = new DataCollector { taskName = "HeadFixedClassicalConditioningTask", AnimalName = animalName }; // Start a thread the waits for the user to start the experiment StartCoroutine(WaitForStart()); }
// Use this for initialization void Start() { base.Start(); sensor = GetComponentInChildren <SensorScript>(); }