Skip to content
Snippets Groups Projects
Commit 588469d3 authored by mariuskern's avatar mariuskern
Browse files

test scroll added

parent 3113362b
No related branches found
No related tags found
No related merge requests found
...@@ -80,43 +80,40 @@ IEnumerator _GetScrollsfromServer() ...@@ -80,43 +80,40 @@ IEnumerator _GetScrollsfromServer()
//UnityWebRequest request = UnityWebRequest.Get("https://019a8ea5-843a-498b-8d0c-778669aef987.mock.pstmn.io/get"); //UnityWebRequest request = UnityWebRequest.Get("https://019a8ea5-843a-498b-8d0c-778669aef987.mock.pstmn.io/get");
System.DateTime requestTime = System.DateTime.UtcNow; System.DateTime requestTime = System.DateTime.UtcNow;
//UnityWebRequest request = null; UnityWebRequest request = null;
//for (int i = 0; i < this.tryScrollListTimes; i++) for (int i = 0; i < this.tryScrollListTimes; i++)
//{ {
// request = UnityWebRequest.Get(CommunicationEvents.ServerAdress + "/scroll/list"); request = UnityWebRequest.Get(CommunicationEvents.ServerAdress + "/scroll/list");
// request.method = UnityWebRequest.kHttpVerbGET; request.method = UnityWebRequest.kHttpVerbGET;
yield return request.SendWebRequest();
// yield return request.SendWebRequest(); if (request.result == UnityWebRequest.Result.ConnectionError
|| request.result == UnityWebRequest.Result.ProtocolError)
// if (request.result == UnityWebRequest.Result.ConnectionError {
// || request.result == UnityWebRequest.Result.ProtocolError) Debug.LogWarning(request.error);
// { Debug.Log("GET Scroll/list failed. Attempt: " + (i + 1).ToString());
// Debug.LogWarning(request.error); }
// Debug.Log("GET Scroll/list failed. Attempt: " + (i + 1).ToString()); else
// } break;
// else }
// break; while (request.result == UnityWebRequest.Result.InProgress)
//} yield return null;
//while (request.result == UnityWebRequest.Result.InProgress)
// yield return null;
System.DateTime answerTime = System.DateTime.UtcNow; System.DateTime answerTime = System.DateTime.UtcNow;
string jsonString = null; string jsonString = null;
//if (request.result == UnityWebRequest.Result.ConnectionError if (request.result == UnityWebRequest.Result.ConnectionError
// || request.result == UnityWebRequest.Result.ProtocolError) || request.result == UnityWebRequest.Result.ProtocolError)
//{ {
// Debug.LogWarning(request.error); Debug.LogWarning(request.error);
//} }
//else else
//{ {
// CommunicationEvents.ServerRunning = true; CommunicationEvents.ServerRunning = true;
while (!request.downloadHandler.isDone)
// while (!request.downloadHandler.isDone) yield return null;
// yield return null; jsonString = request.downloadHandler.text;
// jsonString = request.downloadHandler.text; }
//}
if (string.IsNullOrEmpty(jsonString) if (string.IsNullOrEmpty(jsonString)
|| jsonString.Equals("[]")) || jsonString.Equals("[]"))
......
...@@ -122,6 +122,7 @@ public static class MMTConstants ...@@ -122,6 +122,7 @@ public static class MMTConstants
public const string ScrollCylinderVolumeScroll = "http://mathhub.info/FrameIT/frameworld?CylinderVolumeScroll"; public const string ScrollCylinderVolumeScroll = "http://mathhub.info/FrameIT/frameworld?CylinderVolumeScroll";
public const string ScrollCircleLineAngleToAngleScroll = "http://mathhub.info/FrameIT/frameworld?CircleLineAngleToAngleScroll"; public const string ScrollCircleLineAngleToAngleScroll = "http://mathhub.info/FrameIT/frameworld?CircleLineAngleToAngleScroll";
public const string ScrollMidpoint = "http://mathhub.info/FrameIT/frameworld?Midpoint"; public const string ScrollMidpoint = "http://mathhub.info/FrameIT/frameworld?Midpoint";
public const string ScrollTest = "http://mathhub.info/FrameIT/frameworld?Test";
public const string ScrollCircleScroll = "http://mathhub.info/FrameIT/frameworld?CircleScroll"; public const string ScrollCircleScroll = "http://mathhub.info/FrameIT/frameworld?CircleScroll";
public const string ScrollCircleLineAngleScroll = "http://mathhub.info/FrameIT/frameworld?CircleLineAngleScroll"; public const string ScrollCircleLineAngleScroll = "http://mathhub.info/FrameIT/frameworld?CircleLineAngleScroll";
public const string ScrollCircleAreaScroll = "http://mathhub.info/FrameIT/frameworld?CircleAreaScroll"; public const string ScrollCircleAreaScroll = "http://mathhub.info/FrameIT/frameworld?CircleAreaScroll";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment