From 7335b6642d786ad232c31949f450daf72093712b Mon Sep 17 00:00:00 2001 From: Jacktheholdy <jakob.holdinghausen@fau.de> Date: Sun, 22 Jan 2023 13:49:14 +0100 Subject: [PATCH] TestMiddleTool implemented --- .../Prefabs/UI/Icons/CylinderVolume.prefab | 2 + .../Prefabs/UI/Icons/DisplayLine.prefab | 45 +++++-------------- .../Prefabs/UI/Icons/DisplayPoint.prefab | 45 +++++-------------- .../Prefabs/UI/Ingame/FrameITUI_mobile.prefab | 8 ++-- .../Prefabs/UI/Ingame/GadgetCanvas.prefab | 18 ++++++++ .../Prefabs/UI/Ingame/StartM_2_MnCtrl.prefab | 2 +- .../GadgetDataContainerGadgetCollection.asset | 3 +- Assets/Scripts/GenerateDemoFiles.cs | 2 +- .../InteractionEngine/Gadgets/Gadget.cs | 2 + .../Gadgets/GadgetBehaviour.cs | 2 + UserSettings/EditorUserSettings.asset | 3 ++ 11 files changed, 57 insertions(+), 75 deletions(-) diff --git a/Assets/Resources/Prefabs/UI/Icons/CylinderVolume.prefab b/Assets/Resources/Prefabs/UI/Icons/CylinderVolume.prefab index bf194d69..acc7ce91 100644 --- a/Assets/Resources/Prefabs/UI/Icons/CylinderVolume.prefab +++ b/Assets/Resources/Prefabs/UI/Icons/CylinderVolume.prefab @@ -28,6 +28,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 7509137162853395042} m_RootOrder: 0 @@ -166,6 +167,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 3254540930359715604} m_Father: {fileID: 0} diff --git a/Assets/Resources/Prefabs/UI/Icons/DisplayLine.prefab b/Assets/Resources/Prefabs/UI/Icons/DisplayLine.prefab index dc924311..a1da5a37 100644 --- a/Assets/Resources/Prefabs/UI/Icons/DisplayLine.prefab +++ b/Assets/Resources/Prefabs/UI/Icons/DisplayLine.prefab @@ -28,6 +28,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8643015897288315615} m_RootOrder: 0 @@ -60,6 +61,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -85,13 +87,12 @@ MonoBehaviour: m_fontColorGradientPreset: {fileID: 0} m_spriteAsset: {fileID: 0} m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 m_overrideHtmlColors: 0 m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 m_fontSize: 36 m_fontSizeBase: 36 m_fontWeight: 400 @@ -99,7 +100,9 @@ MonoBehaviour: m_fontSizeMin: 18 m_fontSizeMax: 72 m_fontStyle: 0 - m_textAlignment: 514 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 m_lineSpacing: 0 @@ -109,10 +112,8 @@ MonoBehaviour: m_enableWordWrapping: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 + parentLinkedComponent: {fileID: 0} m_enableKerning: 1 m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -120,40 +121,18 @@ MonoBehaviour: m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 m_horizontalMapping: 0 m_verticalMapping: 0 m_uvLineOffset: 0 m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 5696377050731032053} - characterCount: 1 - spriteCount: 0 - spaceCount: 0 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &7510387096843212865 @@ -188,6 +167,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 3165017659102780400} m_Father: {fileID: 0} @@ -221,6 +201,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -248,10 +229,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: imageToChange: {fileID: 6811289727063397518} - animationStartColor: {r: 0.98039216, g: 0.99215686, b: 0.03137255, a: 1} - animationEndColor: {r: 1, g: 0.52156866, b: 0.007843138, a: 1} - animationTrigger: 0 - animateDuration: 5 --- !u!114 &3914868910838030883 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Prefabs/UI/Icons/DisplayPoint.prefab b/Assets/Resources/Prefabs/UI/Icons/DisplayPoint.prefab index 6e4bfcd6..e554c44a 100644 --- a/Assets/Resources/Prefabs/UI/Icons/DisplayPoint.prefab +++ b/Assets/Resources/Prefabs/UI/Icons/DisplayPoint.prefab @@ -32,6 +32,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 858001164857725564} m_Father: {fileID: 0} @@ -65,6 +66,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -92,10 +94,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: imageToChange: {fileID: 858001163752551617} - animationStartColor: {r: 0.98039216, g: 0.99215686, b: 0.03137255, a: 1} - animationEndColor: {r: 1, g: 0.52156866, b: 0.007843138, a: 1} - animationTrigger: 0 - animateDuration: 5 --- !u!114 &114132791164475416 MonoBehaviour: m_ObjectHideFlags: 0 @@ -160,6 +158,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 858001163752551618} m_RootOrder: 0 @@ -192,6 +191,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -217,13 +217,12 @@ MonoBehaviour: m_fontColorGradientPreset: {fileID: 0} m_spriteAsset: {fileID: 0} m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 m_overrideHtmlColors: 0 m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 m_fontSize: 36 m_fontSizeBase: 36 m_fontWeight: 400 @@ -231,7 +230,9 @@ MonoBehaviour: m_fontSizeMin: 18 m_fontSizeMax: 72 m_fontStyle: 0 - m_textAlignment: 514 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 m_lineSpacing: 0 @@ -241,10 +242,8 @@ MonoBehaviour: m_enableWordWrapping: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 + parentLinkedComponent: {fileID: 0} m_enableKerning: 1 m_enableExtraPadding: 0 checkPaddingRequired: 0 @@ -252,39 +251,17 @@ MonoBehaviour: m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 m_horizontalMapping: 0 m_verticalMapping: 0 m_uvLineOffset: 0 m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 858001164857725563} - characterCount: 1 - spriteCount: 0 - spaceCount: 0 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab index ae7550b5..53aea16a 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab @@ -4112,7 +4112,7 @@ PrefabInstance: - target: {fileID: 9207926681420349736, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_Size - value: 0.4705884 + value: 1 objectReference: {fileID: 0} - target: {fileID: 9207926681420349736, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} @@ -4157,7 +4157,7 @@ PrefabInstance: - target: {fileID: 9207926681532248490, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_AnchoredPosition.x - value: 22783.914 + value: 25777.459 objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 9207926679892754397, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} @@ -4298,12 +4298,12 @@ PrefabInstance: - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} diff --git a/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab b/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab index d587dedb..6574b6c4 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab @@ -189,6 +189,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: dadf4ac08a30dfa43aa57ac646a68767, type: 3} m_Name: m_EditorClassIdentifier: + _ActiveGadgetScaleFactor: 0 _GadgetButton: {fileID: 5345241908758045532, guid: 4804ff343c7a9724abfb4587ac7da08a, type: 3} _ParentMe: {fileID: 0} @@ -517,8 +518,25 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 6315983451093957514, guid: 4804ff343c7a9724abfb4587ac7da08a, + type: 3} + propertyPath: m_TargetGraphic + value: + objectReference: {fileID: 3210610016106763521} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4804ff343c7a9724abfb4587ac7da08a, type: 3} +--- !u!114 &3210610016106763521 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 565795937736748943, guid: 4804ff343c7a9724abfb4587ac7da08a, + type: 3} + m_PrefabInstance: {fileID: 3122257488954702478} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!224 &8883333281790640344 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 5770109655396907606, guid: 4804ff343c7a9724abfb4587ac7da08a, diff --git a/Assets/Resources/Prefabs/UI/Ingame/StartM_2_MnCtrl.prefab b/Assets/Resources/Prefabs/UI/Ingame/StartM_2_MnCtrl.prefab index 9bf9d8e9..6f6db126 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/StartM_2_MnCtrl.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/StartM_2_MnCtrl.prefab @@ -21267,7 +21267,7 @@ MonoBehaviour: m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 1 + m_PresetInfoIsWorld: 0 --- !u!114 &6008639174322951259 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset b/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset index 0d4b6fc5..b5fd0b70 100644 --- a/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset +++ b/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset @@ -26,7 +26,7 @@ MonoBehaviour: - {fileID: 21300000, guid: 64638854d11ebae43b37782de9c88be7, type: 3} - {fileID: 21300000, guid: d456617ba2282854d9570dcebcc2b279, type: 3} - {fileID: 21300000, guid: e35797aede3d7bd449ca9195a409b0cc, type: 3} - GadgetType: ffffffff000000000100000002000000030000000400000005000000060000000700000008000000 + GadgetType: ffffffff00000000010000000200000003000000040000000500000006000000070000000800000009000000 GadgetData: - {fileID: 11400000, guid: 7431ff31b707d2a4082b65b61e15e5df, type: 2} - {fileID: 11400000, guid: c149a1e468d3b3b48a0732c2e0811856, type: 2} @@ -38,3 +38,4 @@ MonoBehaviour: - {fileID: 11400000, guid: 8fb57464fd99014479babf9a76388910, type: 2} - {fileID: 11400000, guid: 06736b134e21b50488990025c33c9c2e, type: 2} - {fileID: 11400000, guid: 6bc4e283502549d428d3c9ce74e91757, type: 2} + - {fileID: 11400000, guid: 35d3197399dc8374280464a237271ac5, type: 2} diff --git a/Assets/Scripts/GenerateDemoFiles.cs b/Assets/Scripts/GenerateDemoFiles.cs index f0fdb1b4..dec387e7 100644 --- a/Assets/Scripts/GenerateDemoFiles.cs +++ b/Assets/Scripts/GenerateDemoFiles.cs @@ -116,7 +116,7 @@ public static void GenerateRiverStage() }; // Set Gadgets/ Scrolls - StageStatic.stage.AllowedGadgets = new() { new Pointer(), new Tape(), new AngleTool(), new LineTool(), new LotTool(), new Pendulum(), new Remover(), new EqualCircleGadget() }; + StageStatic.stage.AllowedGadgets = new() { new Pointer(), new Tape(), new AngleTool(), new LineTool(), new LotTool(), new Pendulum(), new Remover(), new EqualCircleGadget(), new TestMiddlePoint() }; StageStatic.stage.AllowedScrolls = new() { "OppositeLen", "AngleSum", "Pythagoras", "CircleScroll", "CircleAreaScroll", "ConeVolumeScroll", "TruncatedConeVolumeScroll", "CylinderVolumeScroll", "MidPoint", "CircleLineAngleScroll", "CircleLineAngleToAngle", "SupplementaryAngles" }; // Save diff --git a/Assets/Scripts/InteractionEngine/Gadgets/Gadget.cs b/Assets/Scripts/InteractionEngine/Gadgets/Gadget.cs index 3a50271c..097eef5c 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/Gadget.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/Gadget.cs @@ -45,6 +45,7 @@ public enum GadgetIDs PoleTool = 6, Remover = 7, EqualCircles = 8, + MiddlePoint = 9, } public static Dictionary<Type, GadgetIDs> GadgetTypeToIDs = new(){ @@ -58,6 +59,7 @@ public enum GadgetIDs {typeof(PoleTool) , GadgetIDs.PoleTool }, {typeof(Remover) , GadgetIDs.Remover }, {typeof(EqualCircleGadget) , GadgetIDs.EqualCircles }, + {typeof(TestMiddlePoint), GadgetIDs.MiddlePoint }, }; /// <summary> Position in tool belt. </summary> diff --git a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs index 88401b3a..b66908d8 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs @@ -110,6 +110,8 @@ void CreateButton(int gid) buttons = new Button[gadgets.Length]; + Debug.Log("GadjetsNr: " + gadgets.Length); + for (int i = 0; i < gadgets.Length; i++) { gadgets[i].Awake(); diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 7ff4442a..8a05fd1d 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -18,6 +18,9 @@ EditorUserSettings: value: 0709560454055c0d0c5e5c2444740b4413154a72792d22627c714963e0b6373d flags: 0 RecentlyUsedSceneGuid-4: + value: 0502505152005e020c0d0e2446275e44144f19287f707e362c7c4b60b2b9353c + flags: 0 + RecentlyUsedSceneGuid-5: value: 57505505560608585a56557116730644404e4d7b7c7b7562787e4f66e4b1313e flags: 0 RecentlyUsedScenePath-0: -- GitLab