diff --git a/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab b/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab index 65d73c56e651d1bc6bd9c41d1cded0d4a4074dca..6d5da8be2f117f3d45b95b6d0f2ae2a5a1bac2af 100644 --- a/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab +++ b/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab @@ -493,7 +493,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -33139.805} + m_AnchoredPosition: {x: 0, y: -33793.79} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &8823539307371861913 diff --git a/Assets/Scripts/GenerateDemoFiles.cs b/Assets/Scripts/GenerateDemoFiles.cs index 0dd8024f82351497c1dae0bf1527f7a25d83a85c..07330d68919a57fe6de3f3214d2894c70918419a 100644 --- a/Assets/Scripts/GenerateDemoFiles.cs +++ b/Assets/Scripts/GenerateDemoFiles.cs @@ -226,7 +226,7 @@ public static void GenerateCanonBallStage() PointFact topB = new(tmpVec, Vector3.up, StageStatic.stage.solution); string topBURI = StageStatic.stage.solution.Add(topB, out _, true, null, null); - LineFact topology = new LineFact(topAURI, topBURI, StageStatic.stage.solution); + LineFact topology = new (topAURI, topBURI, StageStatic.stage.solution); string lineURI = StageStatic.stage.solution.Add(topology, out _, true, null, null); StageStatic.stage.solution.ExposedSolutionFacts.Add(lineURI); @@ -246,8 +246,7 @@ public static void GenerateCanonBallStage() out _, true, null, null); StageStatic.stage.solution.ExposedSolutionFacts.Add(attacheFactURI); - //TODO: - // ~attach funcs + ~cheat? + //TODO: ~attach funcs + ~cheat? //StageStatic.stage.solution.ValidationSet = // new List<SolutionOrganizer.SubSolution> { // new SolutionOrganizer.SubSolution(new HashSet<string> { target_Id }, null, null, new LineFactHightDirectionComparer()), diff --git a/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs b/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs index 79787d286fc19423549404e66772645a7408b258..c94cde8412aa48a4ab3019ca561ffd6813ff3839 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs @@ -41,10 +41,8 @@ public override void _Hit(RaycastHit[] hit) } } - //Expect a LineFact here, where Line.Pid2 will be the Basis-Point of the angle protected override void _ActivateLineDrawing() { - //In AngleMode with 3 Points we want to draw nearly a rectangle so we add a startPoint and an Endpoint to this preview GadgetBehaviour.LineRenderer.positionCount = curveDrawingVertexCount + 2; GadgetBehaviour.LineRenderer.startWidth = 0.05f; diff --git a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs index 327c53cf469af26e5a011c329cdabb61a491b502..4a214266d0e6a375edaa21e5ceccf53191a047c3 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs @@ -10,7 +10,7 @@ public class GadgetBehaviour : MonoBehaviour, ISerializationCallbackReceiver { // could be worked around of. But as long as not needed: this is better - public static GadgetBehaviour Singelton = null; + public static GadgetBehaviour Singelton { get; private set; } /// <summary>Which cursor to use</summary> /// <remarks>When not set in Inspector, will be searching for any <see cref="WorldCursor"/>.</remarks> diff --git a/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs b/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs index f249084ce9aa20ff835c933bd7549ee1a83000e0..ca80d54abd4bfdb436c3c58b035ec75dfe11d826 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using static CommunicationEvents; +using UnityEngine; public class Tape : Gadget { diff --git a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs index 3c250bc7387cf0016706b8a9a71fa4644cac607b..9903f2160ecfbd2ea366014e25feff783a73bdc1 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs @@ -1,10 +1,9 @@ -using Newtonsoft.Json; using UnityEngine; public class TestMiddlePoint : Gadget { /// \copydoc Gadget.s_type - [JsonProperty] + [Newtonsoft.Json.JsonProperty] protected static new string s_type = "MiddleTool"; //Cache for drawing Line diff --git a/Assets/Scripts/InteractionEngine/ShinyThings.cs b/Assets/Scripts/InteractionEngine/ShinyThings.cs index f9082be1d896f940339bdd7f8414350ab6c00880..f3bbe29d3bdf50ca7017dc663a28571256660951 100644 --- a/Assets/Scripts/InteractionEngine/ShinyThings.cs +++ b/Assets/Scripts/InteractionEngine/ShinyThings.cs @@ -49,7 +49,8 @@ public void Start() public void Update() { - HighlightCurserHit(Cursor.Hit); + foreach(var hit in Cursor.Hits) + HighlightCurserHit(hit); } private void HighlightCurserHit(RaycastHit hit) diff --git a/Assets/Scripts/InteractionEngine/ToolModeText.cs b/Assets/Scripts/InteractionEngine/ToolModeText.cs index f1728cf3892b56eeb9d6be912d4fa42ebabf587a..5e6d92fdbb89b368000fb1a2a6a23b515decbf96 100644 --- a/Assets/Scripts/InteractionEngine/ToolModeText.cs +++ b/Assets/Scripts/InteractionEngine/ToolModeText.cs @@ -2,15 +2,17 @@ public class ToolModeText : MonoBehaviour { - // Start is called before the first frame update - void Start() + private UnityEngine.UI.Text CachedTextField; + + private void Awake() { + CachedTextField = GetComponentInChildren<UnityEngine.UI.Text>(); CommunicationEvents.ToolModeChangedEvent.AddListener(OnToolModeChanged); } void OnToolModeChanged(int id) { //When ToolMode changes: Change Text of active gadget - gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = GadgetBehaviour.gadgets[id].UiName; + CachedTextField.text = GadgetBehaviour.gadgets[id].UiName; } } diff --git a/Assets/Scripts/InteractionEngine/WorldCursor.cs b/Assets/Scripts/InteractionEngine/WorldCursor.cs index a53f0a76d72fd9776e14b2fb1d562b271caee64a..96eefbace24c60009ea1da5b04ea2bc8bbf943e3 100644 --- a/Assets/Scripts/InteractionEngine/WorldCursor.cs +++ b/Assets/Scripts/InteractionEngine/WorldCursor.cs @@ -1,17 +1,9 @@ -using System; -using System.Globalization; -using System.Collections; +using System.Globalization; using System.Collections.Generic; using UnityEngine; -using UnityEngine.Events; using UnityEngine.EventSystems; -using static GadgetBehaviour; -using UnityEngine.InputSystem; using MoreLinq; using System.Linq; -//TODO check whether this can be deleted -//using System.Linq; -//using static GadgetManager; public class WorldCursor : MonoBehaviour { @@ -19,6 +11,8 @@ public class WorldCursor : MonoBehaviour // TODO experimentell for multiple hits public RaycastHit[] Hits; + public float CollisionDistance = 0.1f; + public string deactivateSnapKey; private Camera Cam; private int layerMask; @@ -48,7 +42,7 @@ public void setLayerMask(int layerMask) void Update() { - updateMaxRange(); + UpdateMaxRange(); Cam = Camera.main; //WARN: Should not called every Update; TODO: Cache in Start/Awake? Vector3 mousePos = UIconfig.InputManagerVersion switch @@ -78,7 +72,9 @@ void Update() if (Hits.Length == 0) return; // in case we dont hit anything, just return } - Hits = Hits.OrderBy(h => h.distance).ToArray(); + Hits = Hits + .OrderBy(h => h.distance) + .ToArray(); Fact[] facts = Hits .Select(h => @@ -89,14 +85,7 @@ void Update() int i = 0; for (; i < Hits.Length; i++) - { - // check whether we actually hit something - if (deactSnapKey || - (!Hits[i].collider.transform.CompareTag("SnapZone") - && !Hits[i].collider.transform.CompareTag("Selectable"))) - continue; - - + { // find first acceptable hit if (facts[i] is AbstractLineFact lineFact) { Hits[i].point = @@ -116,19 +105,22 @@ void Update() Hits[i].point = projPlane; } - else + else if (!deactSnapKey && + (Hits[i].collider.transform.CompareTag("SnapZone") + || Hits[i].collider.transform.CompareTag("Selectable"))) { Hits[i].point = Hits[i].collider.transform.position; Hits[i].normal = Vector3.up; } + else + continue; - // checking for 2 lines intersection point - if (Hits.Length <= i + 1 - || Mathf.Abs(Hits[i + 0].distance - Hits[i + 1].distance) > 0.1) - break; // we had at least 1 succesfull case - - // we probably have two objects intersecting + break; // we had at least 1 succesfull case + } + if (i + 1 < Hits.Length + && Hits[i + 1].distance - Hits[i + 0].distance < CollisionDistance) + { // we have two objects intersecting if (facts[i + 0] is RayFact rayFact1 && facts[i + 1] is RayFact rayFact2) { @@ -137,13 +129,10 @@ void Update() , rayFact1.Point1.Point, rayFact1.Dir)) { Hits[i].point = intersectionPoint; - break; } } //TODO: check for other types of intersection. Future Work - - break; // we had at least 1 succesfull case } int nr_hits = Hits.Length - i; @@ -153,16 +142,15 @@ void Update() nr_hits = 1; } Hits = Hits.Slice(i, nr_hits).ToArray(); - Hit = Hits[0]; - transform.up = Hit.normal; - transform.position = Hit.point + .01f * Hit.normal; + transform.up = Hits[0].normal; + transform.position = Hits[0].point + .01f * Hits[0].normal; if (Input.GetMouseButtonDown(0)) ClickHandler(); } - void updateMaxRange() + private void UpdateMaxRange() { switch (UIconfig.GameplayMode) { @@ -180,25 +168,20 @@ void updateMaxRange() } } - //Check if left Mouse-Button was pressed and handle it - void ClickHandler() + private void ClickHandler() { - //TODO edit for the multiple hits. Right now it only checks the first hit - - if (Hit.collider.transform.CompareTag("NPC1_text") + if (Hits[0].collider.transform.CompareTag("NPC1_text") && UIconfig.nextDialogPlease < 2) UIconfig.nextDialogPlease++; if (IsPointerOverUIObject() //Needed for Android. NOT JUST: EventSystem.current.IsPointerOverGameObject() - || Hit.transform.gameObject.layer == LayerMask.NameToLayer("Water") // not allowed to meassure on water - || Hit.collider.transform.CompareTag("NPC1_text")) // not allowed to meassure on textfields + || Hits[0].transform.gameObject.layer == LayerMask.NameToLayer("Water") // not allowed to meassure on water + || Hits[0].collider.transform.CompareTag("NPC1_text")) // not allowed to meassure on textfields return; - //if (Hit.transform.gameObject.layer == LayerMask.NameToLayer("TransparentFX")) return; // not allowed to meassure on TransparentFX CommunicationEvents.TriggerEvent.Invoke(Hits); return; - static bool IsPointerOverUIObject() { PointerEventData eventDataCurrentPosition = new(EventSystem.current) diff --git a/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs b/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs index 6026ae5efe92b5f4c50132066b6027a3a2082d10..70d9c5e9317e15ef88f5e98eb47029c597a25e00 100644 --- a/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs +++ b/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs @@ -1,8 +1,6 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; -using UnityEngine.UI; /// <summary> /// This class handles displaying Fact tooltips, when hovering over a fact in the Gameworld @@ -15,11 +13,14 @@ public class WorldFactInteraction : MonoBehaviour private GameObject currentDisplay; private Transform lastHit = null; private bool canRun = false; + + private void Update() { // disable this script if HidingCanvas does not render canRun = HidingCanvas.GetComponent<Canvas>().enabled; } + void LateUpdate() { if (!canRun) diff --git a/Assets/Scripts/Loading/Loader.cs b/Assets/Scripts/Loading/Loader.cs index a780e754551cec8eedc08afb9c7e4e16770da876..840e7d64c209b8a6675dd01ceab3a9f299f8d76b 100644 --- a/Assets/Scripts/Loading/Loader.cs +++ b/Assets/Scripts/Loading/Loader.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; -using static CommunicationEvents; public static class Loader { @@ -15,11 +11,8 @@ public static class Loader /// <summary> /// <c>return <see cref="loadingscene"/> == <see langword="null"/> ? 1f : <see cref="loadingscene"/>.progress;</c> /// </summary> - public static float progress { - get { - return loadingscene == null ? 1f : loadingscene.progress; - } - } + public static float progress + => loadingscene == null ? 1f : loadingscene.progress; /// <summary> /// <c>return <see cref="loadingscene"/> == null || <see cref="loadingscene"/>.isDone;</c> diff --git a/Assets/Scripts/MeshGenerator/CircleGenerator.cs b/Assets/Scripts/MeshGenerator/CircleGenerator.cs index db4ef9f45958203825705059676db5a3c5e39f87..c07a99c8b781fc2cecc3b98dd291178457b68bcd 100644 --- a/Assets/Scripts/MeshGenerator/CircleGenerator.cs +++ b/Assets/Scripts/MeshGenerator/CircleGenerator.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; diff --git a/Assets/Scripts/MeshGenerator/TorusGenerator.cs b/Assets/Scripts/MeshGenerator/TorusGenerator.cs index f93ed849f69c59034ca85c11e64119590a6d24d0..4ea8e96e3a6abaee0b69ef7b9d2c9fa456fd6c31 100644 --- a/Assets/Scripts/MeshGenerator/TorusGenerator.cs +++ b/Assets/Scripts/MeshGenerator/TorusGenerator.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using System.Linq; using System; public class TorusGenerator : ShapeGenerator diff --git a/Assets/Scripts/Restart.cs b/Assets/Scripts/Restart.cs index 975c4f22cc93c8b55428d9a7a1e6b1a843530a7b..a2fac0efd6c4fc09104fc2bdf353cf11d84059cf 100644 --- a/Assets/Scripts/Restart.cs +++ b/Assets/Scripts/Restart.cs @@ -1,18 +1,12 @@ using UnityEngine; using UnityEngine.SceneManagement; -using static UIconfig; -//using static Restart_script; public class Restart : MonoBehaviour { public static void LevelReset() { StageStatic.stage.ResetPlay(); - //UIconfig.CanvasOnOff_Array[2] = 0; - //UIconfig.GamePaused = false; - //Time.timeScale = 1; // UIconfig.Game_TimeScale; Loader.LoadStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder, false); - //StageStatic.stage.factState.softreset(); } public static void LoadMainMenue() @@ -48,16 +42,14 @@ public static void StageFactState_modload() } - - public static void LoadStartScreen() { - StartServer.process.Kill(); // null reference exception if Server started manually + StartServer.process?.Kill(); SceneManager.LoadScene(0); } public static void OnApplicationQuit() { - StartServer.process.Kill(); // null reference exception if Server started manually + StartServer.process?.Kill(); } } diff --git a/Assets/Scripts/SoundManager.cs b/Assets/Scripts/SoundManager.cs index f1af5e0de7e5523b2f84a8bb2b248c75727b39b8..5837c5b05f40a456297336185c323a5caba7451e 100644 --- a/Assets/Scripts/SoundManager.cs +++ b/Assets/Scripts/SoundManager.cs @@ -5,21 +5,17 @@ public class SoundManager : MonoBehaviour { - public static SoundManager Instance; + public static SoundManager Instance { get; private set; } [SerializeField] Slider volumeSlider; public const float defaultVolume = 0.5f; - // Start is called before the first frame update + + void Start() { if (!PlayerPrefs.HasKey("soundVolume")) - { PlayerPrefs.SetFloat("soundVolume", defaultVolume); - Load(); - } - else - { - Load(); - } + + Load(); } public void Awake() @@ -39,8 +35,7 @@ public void Awake() private void OnDestroy() { - if (!gameObject.IsRoot()) - Instance = null; + Instance = null; } public void ChangeVolume() diff --git a/Assets/Scripts/StartServer.cs b/Assets/Scripts/StartServer.cs index 30d84a1a3d0aaa48e2fd7331e5f88a72475fcb47..e15c4426888e63e4248b71631785060f4e4319a7 100644 --- a/Assets/Scripts/StartServer.cs +++ b/Assets/Scripts/StartServer.cs @@ -65,7 +65,6 @@ IEnumerator ServerRoutine1() command = "\"" + command + "\""; UnityEngine.Debug.Log(command); ProcessStartInfo processInfo; - Process process; //processInfo = new ProcessStartInfo("cmd.exe", "/C " + command); bool cmd = true; @@ -78,7 +77,7 @@ IEnumerator ServerRoutine1() process = Process.Start(processInfo); } else - Process.Start("powershell.exe", command); + process = Process.Start("powershell.exe", command); // *** Read the streams *** // Warning: This approach can lead to deadlocks, see Edit #2 diff --git a/Assets/Scripts/UI/DiscreteBarSlider.cs b/Assets/Scripts/UI/DiscreteBarSlider.cs index 8672acdef9a92e9875ab43bd80502d389a51b604..9e0167151cdca6f768ca3149b43a8aca61d940b0 100644 --- a/Assets/Scripts/UI/DiscreteBarSlider.cs +++ b/Assets/Scripts/UI/DiscreteBarSlider.cs @@ -1,9 +1,6 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; -using UnityEngine.EventSystems; -using UnityEngine.Serialization; public class DiscreteBarSlider : MonoBehaviour { @@ -29,10 +26,7 @@ void Start() void Update() { if (isDragged) - { - isDragged = false; return; - } int targ = GetTarget(); float pos = GetTargetRelativePosition(targ); diff --git a/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs b/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs index e80f7734e564f4a2b060545531b28f5051a3eabc..30b1db9a1de5615d6a2251c7623e8143cdee776d 100644 --- a/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs +++ b/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs @@ -13,6 +13,8 @@ public class OpenFactExplorer : MonoBehaviour, IPointerClickHandler private static Transform factExplorer; private float pressTime = 0f; private const float LONG_PRESS_DURATION = 0.5f; + + private DragHandling CachedDragHandling; #endregion Variables #region UnityMethods @@ -25,6 +27,11 @@ public void OnPointerClick(PointerEventData eventData) } } + private void Awake() + { + CachedDragHandling = GetComponent<DragHandling>(); + } + private void Update() { // open FactExplorer on press on fact longer than LONG_PRESS_DURATION @@ -35,14 +42,14 @@ private void Update() #region Implementation private void HandleTouches() { - if (Input.touchCount != 1 || transform.GetComponent<DragHandling>().dragged) + if (Input.touchCount != 1 || CachedDragHandling.dragged) { pressTime = 0; return; } var touch = Input.GetTouch(0); - if (!RectTransformUtility.RectangleContainsScreenPoint(transform.GetComponent<RectTransform>(), touch.position)) + if (!RectTransformUtility.RectangleContainsScreenPoint((RectTransform)transform, touch.position)) { pressTime = 0; return; diff --git a/Assets/Scripts/UI/InGame/PopupBehavior.cs b/Assets/Scripts/UI/InGame/PopupBehavior.cs index 94de23fbb689a4cd7502183c86a8d8f98bdac2f4..a02a02ce7b84284465a15279abc0f7ae274abd1f 100644 --- a/Assets/Scripts/UI/InGame/PopupBehavior.cs +++ b/Assets/Scripts/UI/InGame/PopupBehavior.cs @@ -48,12 +48,12 @@ public void showPopUp() { canvas.SetActive(true); StartCoroutine(hideAfter5sec()); - } - - private IEnumerator hideAfter5sec() - { - yield return new WaitForSeconds(5); - hidePopUp(); + + IEnumerator hideAfter5sec() + { + yield return new WaitForSeconds(5); + hidePopUp(); + } } public void hidePopUp() diff --git a/Assets/Scripts/UI/InGame/ScalingCollider.cs b/Assets/Scripts/UI/InGame/ScalingCollider.cs index b314aee92b3aa75d68292c0a6d200bc49d13d6a4..71a9f7673daea8ffa73f8da7671d345ee471825f 100644 --- a/Assets/Scripts/UI/InGame/ScalingCollider.cs +++ b/Assets/Scripts/UI/InGame/ScalingCollider.cs @@ -5,7 +5,6 @@ public class ScalingCollider : MonoBehaviour { - private double scale; public double ColliderRadius; public int Collidersize_ID; public bool use_ColliderRadius; @@ -19,21 +18,13 @@ void Start() private void scalingCollider() { - switch (Opsys) + var scale = Opsys switch { - case OperationSystem.Android: - scale = colliderScale_all * UIconfig.colliderScale_Mobile_default; - break; - - case OperationSystem.Windows: - scale = colliderScale_all * UIconfig.colliderScale_PC_default; - break; - - default: - scale = colliderScale_all * UIconfig.colliderScale_PC_default; - break; - } - + OperationSystem.Android + => colliderScale_all * UIconfig.colliderScale_Mobile_default, + OperationSystem.Windows or _ + => colliderScale_all * UIconfig.colliderScale_PC_default, + }; if (use_ColliderRadius) scale *= ColliderRadius; diff --git a/Assets/Scripts/UI/MainMenue/MenueLoader.cs b/Assets/Scripts/UI/MainMenue/MenueLoader.cs index 970a038b2cbbd27c3b9c7f31c7506cb0d93c2829..2a661342d8ed4fae3f5eca42827e2fc370b7ec54 100644 --- a/Assets/Scripts/UI/MainMenue/MenueLoader.cs +++ b/Assets/Scripts/UI/MainMenue/MenueLoader.cs @@ -1,6 +1,3 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; using UnityEngine; /// <summary> @@ -36,21 +33,11 @@ public void RevertMode() /// <param name="select">Page to switch to</param> public void SetMode(int select) { - Clear(); + gameObject.SetActiveAllChildren(false); mode_last = mode; mode = select; Pages.transform.GetChild(select).gameObject.SetActive(true); } - - /// <summary> - /// Deactivates all Pages. - /// </summary> - private void Clear() - { - for (int i = 0; i < Pages.transform.childCount; i++) - Pages.transform.GetChild(i).gameObject.SetActive(false); - } - } diff --git a/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs b/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs index 476c9f3948a2697448c1f4f60778220221bb9eed..0ad9c67ea45843b0da57abcd7ce4843aa024c1a2 100644 --- a/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs +++ b/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs @@ -1,6 +1,4 @@ using System.Collections; -using System.Collections.Generic; -using UnityEngine; public static class IEnumeratorExtensions { diff --git a/Assets/Scripts/Utility/Extensions/RendererExtensions.cs b/Assets/Scripts/Utility/Extensions/RendererExtensions.cs index a5802005b89227a26bf4196139a55e4669f04bd4..bf9786680753f49c44e137760dfeda715a41cefa 100644 --- a/Assets/Scripts/Utility/Extensions/RendererExtensions.cs +++ b/Assets/Scripts/Utility/Extensions/RendererExtensions.cs @@ -17,7 +17,7 @@ public static IEnumerator ProgrammMaterialChange(this Renderer renderer, IEnumer for (IEnumerator<float> lerper = MathfExtensions.LerpInTime(0, 1, lerp_time) ; lerper.MoveNext();) { - renderer.material.Lerp(last_material, new_material , lerper.Current); + renderer.material.Lerp(last_material, new_material, lerper.Current); yield return null; } } diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index dc93d9123a6d75673f0833bc7e502b6f7fe387cf..ebc89c2c6e854f451500f10d795f696d9cc45664 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -30,10 +30,10 @@ EditorUserSettings: value: 00540c020302515f0b0f5f2711265c44171519797e7c7463787d4d63e1b8303c flags: 0 RecentlyUsedSceneGuid-8: - value: 0709560454055c0d0c5e5c2444740b4413154a72792d22627c714963e0b6373d + value: 57505505560608585a56557116730644404e4d7b7c7b7562787e4f66e4b1313e flags: 0 RecentlyUsedSceneGuid-9: - value: 57505505560608585a56557116730644404e4d7b7c7b7562787e4f66e4b1313e + value: 0709560454055c0d0c5e5c2444740b4413154a72792d22627c714963e0b6373d flags: 0 RecentlyUsedScenePath-0: value: 22424703114646680e0b0227036c681f041b1c39631c3435281e1221eee47a2decee22f0