/// <summary> /// Records the data from a trial /// </summary> /// <param name="caught"></param>Whether or not the fruit was caught /// <param name="timeSinceSpawned"></param>The time that the fruit spent active private void ResetTrial(bool caught, float timeSinceSpawned) { GlobalControl gc = GlobalControl.Instance; GetComponent <DataHandler>().recordTrial(Time.time, trialNum, score, timeSinceSpawned, caught, CoPtoCM(Wii.GetCenterOfBalance(0)), gc.spawnDifficulty, gc.userSize, gc.fallSpeed, gc.userSensitivity, gc.fruitSize, gc.trialLength); // Adjust the game parameters slightly for variation gc.userSize = gc.PickAppropriateDifficulty(gc.userSize); gc.fallSpeed = gc.PickAppropriateDifficulty(gc.fallSpeed); gc.userSensitivity = gc.PickAppropriateDifficulty(gc.userSensitivity); gc.fruitSize = gc.PickAppropriateDifficulty(gc.fruitSize); gc.trialLength = gc.PickAppropriateDifficulty(gc.trialLength); // Tell the basket that the game parameters changed basket.GetComponent <Basket>().ResizeBasket(); basket.GetComponent <Basket>().AdjustSensitivity(); SetTrialLength(); trialNum++; }