From de9e078ff53d085c54f0cca7b0a058bc45c45482 Mon Sep 17 00:00:00 2001
From: MaZiFAU <63099053+MaZiFAU@users.noreply.github.com>
Date: Tue, 7 Nov 2023 22:37:56 +0100
Subject: [PATCH] Auto Code Cleane-Up

---
 Assets/Scripts/GlobalBehaviour.cs             |   5 +-
 Assets/Scripts/InteractionEngine/AlignText.cs |  15 +-
 .../FactHandling/Facts/AbstractAngleFact.cs   |   2 -
 .../FactHandling/Facts/AbstractLineFact.cs    |   2 -
 .../FactHandling/Facts/CircleFact.cs          |   1 -
 .../FactHandling/Facts/Fact.cs                |   1 -
 .../FactHandling/Facts/UnsortedFact.cs        |   1 -
 .../FactHandling/Facts/VolumeFacts.cs         |   1 -
 .../Scripts/UI/InGame/EventsystemMode_Ctrl.cs |   4 +-
 Assets/Scripts/Utility/Graph.cs               | 196 +++++++++---------
 10 files changed, 108 insertions(+), 120 deletions(-)

diff --git a/Assets/Scripts/GlobalBehaviour.cs b/Assets/Scripts/GlobalBehaviour.cs
index 2c503ce4..13be7e09 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 aef2424b..04481fb6 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 41e5596e..9a85532b 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 8bcab1b2..36022ae6 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 542d7da8..bb2263f8 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 18c845a7..ac3d8bc0 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 45ef1397..bd05a3b7 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 192cfa3e..07cac373 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 32870efd..b29573ae 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 b488114e..53c8367a 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
 
 }
-- 
GitLab