diff --git a/Assets/Scripts/ExperimentController.cs b/Assets/Scripts/ExperimentController.cs index 863f3fa..91d642d 100644 --- a/Assets/Scripts/ExperimentController.cs +++ b/Assets/Scripts/ExperimentController.cs @@ -33,9 +33,10 @@ public class ExperimentController : MonoBehaviour { #endif UnityEngine.Debug.Log(platform); string response = ""; + UnityEngine.Debug.Log(Application.persistentDataPath); using (WebClient client = new WebClient()) { - string endpoint = "http://do.superpichu.org:5000/" + platform; + string endpoint = "http://" + platform; response = client.DownloadString(endpoint); UnityEngine.Debug.Log("Received Response: " + response); } @@ -72,8 +73,8 @@ public class ExperimentController : MonoBehaviour { double time = stopwatch.Elapsed.TotalSeconds; 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); + //double distance = Vector3.Distance(nextDot.transform.position, startDot.transform.position); + SaveSample(angle, time, false); } if (trialDotIndex < participant.trials[trialIndex].Length) { @@ -116,8 +117,8 @@ public class ExperimentController : MonoBehaviour { double time = stopwatch.Elapsed.TotalSeconds; 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, true); + //double distance = Vector3.Distance(nextDot.transform.position, startDot.transform.position); + SaveSample(angle, time, true); Hide(nextDot); Show(startDot); stopwatch.Start(); @@ -146,11 +147,20 @@ public class ExperimentController : MonoBehaviour { } } - void SaveSample(double angle, double distance, double time, bool direction) + void SaveSample(double angle, double time, bool direction) { Sample sample = new Sample(); sample.Angle = angle; - sample.Distance = distance; + if(nextDot.name.Contains("Short")){ + sample.Distance = 500; + } + else if(nextDot.name.Contains("Medium")){ + sample.Distance = 1000; + } + else if(nextDot.name.Contains("Long")){ + sample.Distance = 1500; + } + else sample.Time = time; sample.Direction = direction; sample.DotName = nextDot.name; diff --git a/Assets/Scripts/Sample.cs b/Assets/Scripts/Sample.cs index 06d629c..c15b773 100644 --- a/Assets/Scripts/Sample.cs +++ b/Assets/Scripts/Sample.cs @@ -17,6 +17,6 @@ namespace Assets.Scripts public int TrialIndex { get; set; } public int DotIndex { get; set; } public long Timestamp { get; set; } - public int DotSize = 100; + public int DotSize = 100; } }