we done with data entry BITCH!
This commit is contained in:
parent
a0dfede3ac
commit
5c9c0f5214
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Assets.Scripts;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -15,8 +16,20 @@ public class ExperimentController : MonoBehaviour {
|
|||||||
List<GameObject> dots = new List<GameObject>();
|
List<GameObject> dots = new List<GameObject>();
|
||||||
Stopwatch stopwatch = new Stopwatch();
|
Stopwatch stopwatch = new Stopwatch();
|
||||||
GameObject playerCamera;
|
GameObject playerCamera;
|
||||||
|
DataSet dataSet = new DataSet();
|
||||||
|
string platform;
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start () {
|
void Start () {
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
platform = "cardboard";
|
||||||
|
#endif
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
platform = "mouse";
|
||||||
|
#endif
|
||||||
|
#if UNITY_STANDALONE_WIN
|
||||||
|
platform = "rift";
|
||||||
|
#endif
|
||||||
|
|
||||||
//FOR THE LOVE OF GOD FUCKING DELETE THIS, SERIOUSLY CHRIS DON'T YOU DARE FORGET
|
//FOR THE LOVE OF GOD FUCKING DELETE THIS, SERIOUSLY CHRIS DON'T YOU DARE FORGET
|
||||||
string fuck = "ewoidHJpYWxzIiA6IFsKICBbIkxlZnRMb25nIiwiUmlnaHRNZWRpdW0iLCJMZWZ0U2hvcnQiLCJVcE1lZGl1bSIsIlVwTG9uZyIsIlJpZ2h0U2hvcnQiXSwKICBbIlVwU2hvcnQiLCJSaWdodExvbmciLCJMZWZ0TWVkaXVtIiwiUmlnaHRNZWRpdW0iLCJMZWZ0TG9uZyIsIlVwTG9uZyJdLAogIFsiUmlnaHRTaG9ydCIsIlVwTWVkaXVtIiwiTGVmdE1lZGl1bSIsIkxlZnRTaG9ydCIsIlJpZ2h0TG9u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wiUmlnaHRNZWRpdW0iLCJMZWZ0U2hvcnQiLCJVcE1lZGl1bSIsIlVwTG9uZyIsIlJpZ2h0U2hvcnQiXSwKICBbIlVwU2hvcnQiLCJSaWdodExvbmciLCJMZWZ0TWVkaXVtIiwiUmlnaHRNZWRpdW0iLCJMZWZ0TG9uZyIsIlVwTG9uZyJdLAogIFsiUmlnaHRTaG9ydCIsIlVwTWVkaXVtIiwiTGVmdE1lZGl1bSIsIkxlZnRTaG9ydCIsIlJpZ2h0TG9uZyIsIlVwU2hvcnQiXSwKICBbIkxlZnRMb25nIiwiUmlnaHRNZWRpdW0iLCJMZWZ0U2hvcnQiLCJVcE1lZGl1bSIsIlVwTG9uZyIsIlJpZ2h0U2hvcnQiXSwKICBbIlVwU2hvcnQiLCJSaWdodExvbmciLCJMZWZ0TWVkaXVtIiwiUmlnaHRNZWRpdW0iLCJMZWZ0TG9uZyIsIlVwTG9uZyJdLAogIFsiUmlnaHRTaG9ydCIsIlVwTWVkaXVtIiwiTGVmdE1lZGl1bSIsIkxlZnRTaG9ydCIsIlJpZ2h0TG9uZyIsIlVwU2hvcnQiXQpdLAoicGFydGljaXBhbnRJZCIgOiAxLAoiaW5wdXRNZXRob2QiIDogImNhcmRib2FyZCIKfQo=";
|
||||||
byte[] decodedBytes = Convert.FromBase64String(fuck);
|
byte[] decodedBytes = Convert.FromBase64String(fuck);
|
||||||
@ -52,16 +65,34 @@ public class ExperimentController : MonoBehaviour {
|
|||||||
stopwatch.Stop();
|
stopwatch.Stop();
|
||||||
double time = stopwatch.Elapsed.TotalSeconds;
|
double time = stopwatch.Elapsed.TotalSeconds;
|
||||||
stopwatch.Reset();
|
stopwatch.Reset();
|
||||||
|
double angle = Vector3.Angle(nextDot.transform.position, playerCamera.transform.position);
|
||||||
|
double distance = Vector3.Distance(nextDot.transform.position, startDot.transform.position);
|
||||||
|
SaveSample(angle, distance, time, false);
|
||||||
|
}
|
||||||
|
if (trialDotIndex < participant.trials[trialIndex].Length)
|
||||||
|
{
|
||||||
|
|
||||||
|
nextDot = FindDot(participant.trials[trialIndex][trialDotIndex]);
|
||||||
|
trialDotIndex++;
|
||||||
|
Show(nextDot);
|
||||||
|
Hide(startDot);
|
||||||
|
}
|
||||||
|
else if(trialIndex < participant.trials.Length)
|
||||||
|
{
|
||||||
|
// NEXT TRIAL SHIT
|
||||||
|
trialIndex++;
|
||||||
|
trialDotIndex = 0;
|
||||||
|
dataSet.SaveDataSet();
|
||||||
|
dataSet.Samples.Clear();
|
||||||
|
nextDot = FindDot(participant.trials[trialIndex][trialDotIndex]);
|
||||||
|
Show(nextDot);
|
||||||
|
Hide(startDot);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stopwatch.Start();
|
dataSet.SaveDataSet();
|
||||||
}
|
}
|
||||||
nextDot = FindDot(participant.trials[trialIndex][trialDotIndex]);
|
stopwatch.Start();
|
||||||
trialDotIndex++;
|
|
||||||
Show(nextDot);
|
|
||||||
Hide(startDot);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -71,11 +102,12 @@ public class ExperimentController : MonoBehaviour {
|
|||||||
stopwatch.Stop();
|
stopwatch.Stop();
|
||||||
double time = stopwatch.Elapsed.TotalSeconds;
|
double time = stopwatch.Elapsed.TotalSeconds;
|
||||||
stopwatch.Reset();
|
stopwatch.Reset();
|
||||||
|
|
||||||
double angle = Vector3.Angle(nextDot.transform.position, playerCamera.transform.position);
|
double angle = Vector3.Angle(nextDot.transform.position, playerCamera.transform.position);
|
||||||
double arcDistance = angle * (float)(Math.PI / 180) * 10;
|
double distance = Vector3.Distance(nextDot.transform.position, startDot.transform.position);
|
||||||
|
SaveSample(angle, distance, time, true);
|
||||||
Hide(nextDot);
|
Hide(nextDot);
|
||||||
Show(startDot);
|
Show(startDot);
|
||||||
|
stopwatch.Start();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -101,17 +133,36 @@ public class ExperimentController : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
void SaveSample(double angle, double distance, double time, bool direction)
|
||||||
void Update () {
|
{
|
||||||
|
Sample sample = new Sample();
|
||||||
}
|
sample.Angle = angle;
|
||||||
|
sample.Distance = distance;
|
||||||
|
sample.Time = time;
|
||||||
|
sample.Direction = direction;
|
||||||
|
sample.DotName = nextDot.name;
|
||||||
|
sample.DotIndex = trialDotIndex;
|
||||||
|
sample.TrialIndex = trialIndex + 1;
|
||||||
|
sample.ParticipantID = participant.participantId;
|
||||||
|
sample.Platform = platform;
|
||||||
|
TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
|
||||||
|
sample.Timestamp = (long)t.TotalMilliseconds;
|
||||||
|
dataSet.Samples.Add(sample);
|
||||||
|
}
|
||||||
|
|
||||||
GameObject FindDot(string name)
|
GameObject FindDot(string name)
|
||||||
{
|
{
|
||||||
foreach(GameObject dot in dots)
|
foreach (GameObject dot in dots)
|
||||||
{
|
{
|
||||||
if (dot.name == name) return dot;
|
if (dot.name == name) return dot;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ PlayerSettings:
|
|||||||
useOnDemandResources: 0
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: DefaultCompany
|
||||||
productName: Defuckulate
|
productName: FittsVR
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||||
|
Loading…
Reference in New Issue
Block a user