Added done text

This commit is contained in:
Chris Midkiff
2018-11-29 19:18:09 -05:00
parent 7f8f2f5a88
commit aafee8ff86
4 changed files with 152 additions and 69 deletions

View File

@@ -17,6 +17,7 @@ public class ExperimentController : MonoBehaviour {
List<GameObject> dots = new List<GameObject>();
Stopwatch stopwatch = new Stopwatch();
GameObject playerCamera;
GameObject text;
DataSet dataSet = new DataSet();
string platform;
// Use this for initialization
@@ -30,6 +31,7 @@ public class ExperimentController : MonoBehaviour {
#if UNITY_STANDALONE_WIN
platform = "oculus";
#endif
UnityEngine.Debug.Log(platform);
string response = "";
using (WebClient client = new WebClient())
{
@@ -47,6 +49,8 @@ public class ExperimentController : MonoBehaviour {
dots.Add(go);
Hide(go);
};
text = GameObject.Find("Text");
text.SetActive(false);
}
@@ -86,9 +90,17 @@ public class ExperimentController : MonoBehaviour {
trialDotIndex = 0;
dataSet.SaveDataSet();
dataSet.Samples.Clear();
nextDot = FindDot(participant.trials[trialIndex][trialDotIndex]);
Show(nextDot);
Hide(startDot);
if (trialIndex < participant.trials.Length)
{
nextDot = FindDot(participant.trials[trialIndex][trialDotIndex]);
Show(nextDot);
Hide(startDot);
}
else
{
text.SetActive(true);
}
}
else
{