Skip to content
Snippets Groups Projects
Commit 459d656e authored by MaZiFAU's avatar MaZiFAU
Browse files

Reactivatet scroll/list; updated scroll.json; updated StreamingAssets; Refactor AlignText; -

parent cdd11988
No related branches found
No related tags found
No related merge requests found
Showing
with 79826 additions and 54760 deletions
...@@ -80,43 +80,43 @@ IEnumerator _GetScrollsfromServer() ...@@ -80,43 +80,43 @@ 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 if (request.result == UnityWebRequest.Result.ConnectionError
// || request.result == UnityWebRequest.Result.ProtocolError) || request.result == UnityWebRequest.Result.ProtocolError)
// { {
// Debug.LogWarning(request.error); Debug.LogWarning(request.error);
// Debug.Log("GET Scroll/list failed. Attempt: " + (i + 1).ToString()); Debug.Log("GET Scroll/list failed. Attempt: " + (i + 1).ToString());
// } }
// else else
// break; break;
//} }
//while (request.result == UnityWebRequest.Result.InProgress) while (request.result == UnityWebRequest.Result.InProgress)
// yield return null; 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("[]"))
......
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
//using UnityEngine.EventSystems;
using static UIconfig;
public class AlignText : MonoBehaviour public class AlignText : MonoBehaviour
{ {
// Start is called before the first frame update
private Camera Cam; private Camera Cam;
public Camera Cam1; public Camera Cam1;
public Camera Cam2; public Camera Cam2;
public Camera BackUPCam; public Camera BackUPCam;
// public GameObject Moving_GObj;
void Start() void Start()
{ {
StartCoroutine(CheckForNewMainCamRoutine()); StartCoroutine(CheckForNewMainCamRoutine());
} }
// Update is called once per frame
void Update() void Update()
{ {
//print("Cam" + Cam); if (Cam == null)
//CheckForNewMainCamRoutine(); return;
if (Cam == null) { return; }
transform.forward = Cam.transform.forward; transform.forward = Cam.transform.forward;
//Not yet the perfect solution //TODO: this should be done via event system when controlMode is changed; not every Frame!
//Problem is the relative rotation of the TextMesh to the Line-Parent
//transform.rotation = Quaternion.Lerp(transform.parent.transform.rotation, Cam.transform.rotation, 0);
//if (Moving_GObj) { }
//Überprüfen ob Textfeld einen Collider hat, und wenn ja dieser aktiv sein soll //Überprüfen ob Textfeld einen Collider hat, und wenn ja dieser aktiv sein soll
if (gameObject.GetComponent<BoxCollider>() != null) if (gameObject.TryGetComponent(out BoxCollider boxCollider))
{ {
if (UIconfig.controlMode == ControlMode.Keyboard) { gameObject.GetComponent<BoxCollider>().enabled = false; } if (UIconfig.controlMode == UIconfig.ControlMode.Keyboard)
if (UIconfig.controlMode == ControlMode.Mobile) { gameObject.GetComponent<BoxCollider>().enabled = true; } boxCollider.enabled = false;
if (UIconfig.controlMode == UIconfig.ControlMode.Mobile)
boxCollider.enabled = true;
} }
} }
...@@ -53,30 +43,15 @@ Camera toCamMain() ...@@ -53,30 +43,15 @@ Camera toCamMain()
return Camera.main; return Camera.main;
} }
IEnumerator CheckForNewMainCamRoutine() IEnumerator CheckForNewMainCamRoutine()
{ {
yield return new WaitForSeconds(0);//Verzögerung für Bug aufhebung hinzugefügt, Bug selbst aktuell vergessen yield return new WaitForSeconds(0);//Verzögerung für Bug aufhebung hinzugefügt, Bug selbst aktuell vergessen
switch (UIconfig.MainCameraID) Cam = UIconfig.MainCameraID switch
{ {
case 0: 0 => toCamMain(),
Cam = toCamMain(); 1 => Cam1,
break; 2 => Cam2,
case 1: _ => toCamMain(),
Cam = Cam1; };
break;
case 2:
Cam = Cam2;
break;
default:
Cam = toCamMain();
break;
} }
//StopCoroutine(CheckForNewMainCamRoutine());
//print("Stopped:CheckForNewMainCamRoutine()");
//Cam = Camera.main;
}
} }
...@@ -333,6 +333,8 @@ string prepareScrollAssignments() ...@@ -333,6 +333,8 @@ string prepareScrollAssignments()
private void processScrollDynamicInfo(ScrollDynamicInfo scrollDynamicInfo) private void processScrollDynamicInfo(ScrollDynamicInfo scrollDynamicInfo)
{ {
//TODO: more hints available in scrollDynamicInfo.rendered.requiredFacts
LatestBackwartsCompletions = scrollDynamicInfo.backward_completions.Count > 0 LatestBackwartsCompletions = scrollDynamicInfo.backward_completions.Count > 0
? scrollDynamicInfo.backward_completions[0] ? scrollDynamicInfo.backward_completions[0]
: new List<ScrollAssignment>(); : new List<ScrollAssignment>();
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: ce8e4f40f12811b41b4eb2c1b7b6ece7 guid: 82a2bc667aa1ebf46bb2a36bd51324cb
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5eea08c14507fec4c94d684de8fa90d4 guid: ff0a7c5092a226b4fadb8e48adb580b4
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
This diff is collapsed.
fileFormatVersion: 2
guid: e91cf6d7f4d81bb46a18a46e0788afd4
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
} }
], ],
"ExposedSolutionFacts": [], "ExposedSolutionFacts": [],
"ScrollOverwrites": {},
"ImmutableFacts": [], "ImmutableFacts": [],
"WorkflowGadgetDict": { "WorkflowGadgetDict": {
"-1": null "-1": null
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
}, },
{ {
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2", "Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2",
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
}, },
{ {
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3", "Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3",
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
} }
], ],
"marker": 3, "marker": 3,
...@@ -93,11 +94,7 @@ ...@@ -93,11 +94,7 @@
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"s_type": "PointFact", "s_type": "PointFact",
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact1"
},
"Label": "A",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 1 "LabelId": 1
}, },
...@@ -124,11 +121,7 @@ ...@@ -124,11 +121,7 @@
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"s_type": "PointFact", "s_type": "PointFact",
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact2"
},
"Label": "B",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 2 "LabelId": 2
}, },
...@@ -143,11 +136,7 @@ ...@@ -143,11 +136,7 @@
"magnitude": 1.0, "magnitude": 1.0,
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact3"
},
"Label": "[AB]",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 0 "LabelId": 0
} }
...@@ -155,6 +144,7 @@ ...@@ -155,6 +144,7 @@
"name": null, "name": null,
"path": null "path": null
}, },
"record_index": null,
"solution_approches": [], "solution_approches": [],
"AllowedScrolls": null, "AllowedScrolls": null,
"AllowedGadgets": null, "AllowedGadgets": null,
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 06d0d19df08933a4a8846351bb46ea37 guid: 195df17949e85d146a570194f168bf07
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
} }
], ],
"ExposedSolutionFacts": [], "ExposedSolutionFacts": [],
"ScrollOverwrites": {},
"ImmutableFacts": [], "ImmutableFacts": [],
"WorkflowGadgetDict": { "WorkflowGadgetDict": {
"-1": null "-1": null
...@@ -64,7 +65,7 @@ ...@@ -64,7 +65,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
}, },
{ {
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5", "Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5",
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
}, },
{ {
"Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6", "Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6",
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
"gadget_rank": -1, "gadget_rank": -1,
"scroll_label": null, "scroll_label": null,
"GadgetFlow": [], "GadgetFlow": [],
"GadgetTime": 0.9207362000000785 "GadgetTime": 0.0
} }
], ],
"marker": 3, "marker": 3,
...@@ -111,11 +112,7 @@ ...@@ -111,11 +112,7 @@
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"s_type": "PointFact", "s_type": "PointFact",
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact4"
},
"Label": "A",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 1 "LabelId": 1
}, },
...@@ -142,11 +139,7 @@ ...@@ -142,11 +139,7 @@
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"s_type": "PointFact", "s_type": "PointFact",
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact5"
},
"Label": "B",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 2 "LabelId": 2
}, },
...@@ -161,11 +154,7 @@ ...@@ -161,11 +154,7 @@
"magnitude": 1.0, "magnitude": 1.0,
"sqrMagnitude": 1.0 "sqrMagnitude": 1.0
}, },
"ServerDefinition": { "_CustomLabel": null,
"kind": "OMS",
"uri": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact6"
},
"Label": "[AB]",
"hasCustomLabel": false, "hasCustomLabel": false,
"LabelId": 0 "LabelId": 0
} }
...@@ -173,6 +162,7 @@ ...@@ -173,6 +162,7 @@
"name": null, "name": null,
"path": null "path": null
}, },
"record_index": null,
"solution_approches": [], "solution_approches": [],
"AllowedScrolls": [ "AllowedScrolls": [
"http://mathhub.info/FrameIT/frameworld?OppositeLen" "http://mathhub.info/FrameIT/frameworld?OppositeLen"
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: ae1880b5e2f44cf479c0c5e6f94d37ba guid: a5dd57ea3c70d7741a8140588e416068
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment