diff --git a/Assets/Scripts/GlobalBehaviour.cs b/Assets/Scripts/GlobalBehaviour.cs index 2c503ce4e25dc72b7b1c3ad85fa18f8f64fccfd8..13be7e09be532b0ed926d8742c6a69b4a5b6147e 100644 --- a/Assets/Scripts/GlobalBehaviour.cs +++ b/Assets/Scripts/GlobalBehaviour.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; -using UnityEditor.PackageManager.Requests; using UnityEngine; using UnityEngine.Networking; @@ -169,7 +168,7 @@ IEnumerator _GetContextfromServer() else break; } - while(request.result == UnityWebRequest.Result.InProgress) + while (request.result == UnityWebRequest.Result.InProgress) yield return null; System.DateTime answerTime = System.DateTime.UtcNow; @@ -217,7 +216,7 @@ IEnumerator _GetContextfromServer() System.DateTime parse_time = System.DateTime.Now; yield return ParsingDictionary.parseFactDictionary[fact.getType()](new_list, fact); justParseTime += System.DateTime.Now - parse_time; - + if (new_list.Count == 0) { Debug.LogWarning("Parsing on context-fact returned empty List -> One of the dependent facts does not exist or parsing failed"); diff --git a/Assets/Scripts/InteractionEngine/AlignText.cs b/Assets/Scripts/InteractionEngine/AlignText.cs index aef2424bcb25cd38bf8be48ec085218792049076..04481fb633e3f38866951791fef0984ffb8b6947 100644 --- a/Assets/Scripts/InteractionEngine/AlignText.cs +++ b/Assets/Scripts/InteractionEngine/AlignText.cs @@ -1,9 +1,6 @@ using System.Collections; -using System.Linq; using UnityEngine; //using UnityEngine.EventSystems; -using UnityEngine.UI; -using static UIconfig; public class AlignText : MonoBehaviour { @@ -13,11 +10,11 @@ public class AlignText : MonoBehaviour public Camera Cam1; public Camera Cam2; public Camera BackUPCam; - // public GameObject Moving_GObj; + // public GameObject Moving_GObj; void Start() { - + StartCoroutine(CheckForNewMainCamRoutine()); } @@ -26,10 +23,10 @@ void Update() { //print("Cam" + Cam); //CheckForNewMainCamRoutine(); - if (Cam==null) { return; } - + if (Cam == null) { return; } + transform.forward = Cam.transform.forward; - + //Not yet the perfect solution //Problem is the relative rotation of the TextMesh to the Line-Parent //transform.rotation = Quaternion.Lerp(transform.parent.transform.rotation, Cam.transform.rotation, 0); @@ -54,7 +51,7 @@ IEnumerator CheckForNewMainCamRoutine() yield return new WaitForSeconds(0);//Verzögerung für Bug aufhebung hinzugefügt, Bug selbst aktuell vergessen switch (UIconfig.MainCameraID) - { + { case 0: Cam = toCamMain(); break; diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractAngleFact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractAngleFact.cs index 41e5596ed3942393bef817f44d5649d8690c6acb..9a85532b3a2e4f52562a5d63fe2109cafd51eb06 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractAngleFact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractAngleFact.cs @@ -3,9 +3,7 @@ using System; using System.Collections; using System.Collections.Generic; -using TMPro; using UnityEngine; -using UnityEngine.UIElements; public abstract class AbstractAngleFact : FactWrappedCRTP<AbstractAngleFact> { diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractLineFact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractLineFact.cs index 8bcab1b29daa7dc044b0003c2551f8596376c586..36022ae6d6caeb0e230db13fc6e8d1e00551b0a7 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractLineFact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/AbstractLineFact.cs @@ -1,10 +1,8 @@ using Newtonsoft.Json; using REST_JSON_API; -using System; using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEngine.WSA; /// <summary> /// Base-class for 1D-Facts diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/CircleFact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/CircleFact.cs index 542d7da889aba5cae5e055502e4a7dab129b920f..bb2263f8ad3620c9bd0599e81c80f11becceccc4 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/CircleFact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/CircleFact.cs @@ -4,7 +4,6 @@ using Newtonsoft.Json; using REST_JSON_API; using System.Collections; -using System.Xml.Linq; /// <summary> /// A Circle that is made out of a middle point, a plane and a radius diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/Fact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/Fact.cs index 18c845a7db53ea5605cf1a0a2fdfd82fd3eb4529..ac3d8bc04998aca7c55c456ddcbcbf82b62981ea 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/Fact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/Fact.cs @@ -6,7 +6,6 @@ using JsonSubTypes; using System.Linq; using REST_JSON_API; -using System.Drawing; using System.Collections; using System.Linq.Expressions; diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/UnsortedFact.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/UnsortedFact.cs index 45ef1397f9438600fc055492bc2a3400e7d1a156..bd05a3b738ad41029b953fe49d099147e38dadbf 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/UnsortedFact.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/UnsortedFact.cs @@ -5,7 +5,6 @@ using System; using UnityEngine; using System.Collections; -using System.Xml.Linq; /// <summary> /// Point in 3D Space diff --git a/Assets/Scripts/InteractionEngine/FactHandling/Facts/VolumeFacts.cs b/Assets/Scripts/InteractionEngine/FactHandling/Facts/VolumeFacts.cs index 192cfa3ed8c930c9ab529e9859092187f39ef2f6..07cac37357b88150c40667954c8ef61fc131d5e7 100644 --- a/Assets/Scripts/InteractionEngine/FactHandling/Facts/VolumeFacts.cs +++ b/Assets/Scripts/InteractionEngine/FactHandling/Facts/VolumeFacts.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Newtonsoft.Json; using REST_JSON_API; -using UnityEngine.WSA; /// <summary> /// The volume of a cone A defined by a base area <see cref="CircleFact">CircleFact</see>, an apex <see cref="PointFact">PointFact</see> and the volume as float diff --git a/Assets/Scripts/UI/InGame/EventsystemMode_Ctrl.cs b/Assets/Scripts/UI/InGame/EventsystemMode_Ctrl.cs index 32870efdb794b1c3ac9c91fffb21d0f445b70506..b29573ae7ee3947f4a0060638124fd9ea434075a 100644 --- a/Assets/Scripts/UI/InGame/EventsystemMode_Ctrl.cs +++ b/Assets/Scripts/UI/InGame/EventsystemMode_Ctrl.cs @@ -54,8 +54,8 @@ private void Update2() break; case 2: - //InputSystem_script.ActivateModule(); - //StandaloneInputModule_script.DeactivateModule(); + //InputSystem_script.ActivateModule(); + //StandaloneInputModule_script.DeactivateModule(); case 3: default: gameObject.GetComponent<StandaloneInputModule>().enabled = false; diff --git a/Assets/Scripts/Utility/Graph.cs b/Assets/Scripts/Utility/Graph.cs index b488114e5cb97edcf888eafe36658e99357a96ad..53c8367a0137b755234bc96ab8bab14b4191b780 100644 --- a/Assets/Scripts/Utility/Graph.cs +++ b/Assets/Scripts/Utility/Graph.cs @@ -4,103 +4,103 @@ /// </summary> namespace geeksforgeeks { - // A C# program to print topological - // sorting of a DAG - using System; - using System.Collections.Generic; - - // This class represents a directed graph - // using adjacency list representation - class Graph - { - - // No. of vertices - private readonly int V; - - // Adjacency List as ArrayList - // of ArrayList's - private List<List<int>> adj; - - // Constructor - Graph(int v) - { - V = v; - adj = new List<List<int>>(v); - for (int i = 0; i < v; i++) - adj.Add(new List<int>()); - } - - // Function to add an edge into the graph - public void AddEdge(int v, int w) { adj[v].Add(w); } - - // A recursive function used by topologicalSort - void TopologicalSortUtil(int v, bool[] visited, - Stack<int> stack) - { - - // Mark the current node as visited. - visited[v] = true; - - // Recur for all the vertices - // adjacent to this vertex - foreach (var vertex in adj[v]) - { - if (!visited[vertex]) - TopologicalSortUtil(vertex, visited, stack); - } - - // Push current vertex to - // stack which stores result - stack.Push(v); - } - - // The function to do Topological Sort. - // It uses recursive topologicalSortUtil() - void TopologicalSort() - { - Stack<int> stack = new Stack<int>(); - - // Mark all the vertices as not visited - var visited = new bool[V]; - - // Call the recursive helper function - // to store Topological Sort starting - // from all vertices one by one - for (int i = 0; i < V; i++) - { - if (visited[i] == false) - TopologicalSortUtil(i, visited, stack); - } - - // Print contents of stack - foreach (var vertex in stack) - { - Console.Write(vertex + " "); - } - } - - // Driver code - public static void Main(string[] args) - { - - // Create a graph given - // in the above diagram - Graph g = new Graph(6); - g.AddEdge(5, 2); - g.AddEdge(5, 0); - g.AddEdge(4, 0); - g.AddEdge(4, 1); - g.AddEdge(2, 3); - g.AddEdge(3, 1); - - Console.WriteLine("Following is a Topological " - + "sort of the given graph"); - - // Function Call - g.TopologicalSort(); - } - } - - // This code is contributed by Abhinav Galodha + // A C# program to print topological + // sorting of a DAG + using System; + using System.Collections.Generic; + + // This class represents a directed graph + // using adjacency list representation + class Graph + { + + // No. of vertices + private readonly int V; + + // Adjacency List as ArrayList + // of ArrayList's + private List<List<int>> adj; + + // Constructor + Graph(int v) + { + V = v; + adj = new List<List<int>>(v); + for (int i = 0; i < v; i++) + adj.Add(new List<int>()); + } + + // Function to add an edge into the graph + public void AddEdge(int v, int w) { adj[v].Add(w); } + + // A recursive function used by topologicalSort + void TopologicalSortUtil(int v, bool[] visited, + Stack<int> stack) + { + + // Mark the current node as visited. + visited[v] = true; + + // Recur for all the vertices + // adjacent to this vertex + foreach (var vertex in adj[v]) + { + if (!visited[vertex]) + TopologicalSortUtil(vertex, visited, stack); + } + + // Push current vertex to + // stack which stores result + stack.Push(v); + } + + // The function to do Topological Sort. + // It uses recursive topologicalSortUtil() + void TopologicalSort() + { + Stack<int> stack = new Stack<int>(); + + // Mark all the vertices as not visited + var visited = new bool[V]; + + // Call the recursive helper function + // to store Topological Sort starting + // from all vertices one by one + for (int i = 0; i < V; i++) + { + if (visited[i] == false) + TopologicalSortUtil(i, visited, stack); + } + + // Print contents of stack + foreach (var vertex in stack) + { + Console.Write(vertex + " "); + } + } + + // Driver code + public static void Main(string[] args) + { + + // Create a graph given + // in the above diagram + Graph g = new Graph(6); + g.AddEdge(5, 2); + g.AddEdge(5, 0); + g.AddEdge(4, 0); + g.AddEdge(4, 1); + g.AddEdge(2, 3); + g.AddEdge(3, 1); + + Console.WriteLine("Following is a Topological " + + "sort of the given graph"); + + // Function Call + g.TopologicalSort(); + } + } + + // This code is contributed by Abhinav Galodha }