diff --git a/Assets/Resources/Prefabs/UI/FrameITUI.prefab b/Assets/Resources/Prefabs/UI/FrameITUI.prefab index 3fd1eadffe361b9af9873664f9bb535f00973329..6503fe1b7e39d8eb71e9786c4cb571470b9cc286 100644 --- a/Assets/Resources/Prefabs/UI/FrameITUI.prefab +++ b/Assets/Resources/Prefabs/UI/FrameITUI.prefab @@ -406,12 +406,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} @@ -651,7 +651,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} @@ -691,7 +691,7 @@ PrefabInstance: - target: {fileID: 9207926681532248490, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_AnchoredPosition.x - value: 3903.3896 + value: 5128.3374 objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 9207926679892754397, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} diff --git a/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab b/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab new file mode 100644 index 0000000000000000000000000000000000000000..dcf2cd15c1c3674817717d174ed791a675ffbaf1 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab @@ -0,0 +1,177 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &3070373232854111650 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 858001163752551617, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 9831128faf2531e4cba52f58894091be, + type: 3} + - target: {fileID: 858001163752551617, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551618, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_Name + value: MiddlePoint + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_fontColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_fontColor.g + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_fontColor.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_textAlignment + value: 65535 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_fontColor32.rgba + value: 4278190080 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_TextStyleHashCode + value: -1183493901 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_VerticalAlignment + value: 512 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725563, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_HorizontalAlignment + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 858001164857725565, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f019e9f67e8dab947bc60028223b6cec, type: 3} diff --git a/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab.meta b/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..853831c89b581a7623345afabeefcf312242f1a5 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/Icons/MiddlePoint.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bfe4f2333586a91489047b27b788230d +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab index 53aea16a96ac503a30f3fb564c0d661fadbd191c..28fd821d425901039f4c41850e1acd095bda0b18 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/FrameITUI_mobile.prefab @@ -3979,6 +3979,101 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 4842294571495540312} m_Modifications: + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4623092116721457026, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5171782508373878537, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6417303587324338980, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6573826504273724345, guid: b162218cc487f1242bd5ac7b4315a051, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 9207926679512206244, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_IsActive @@ -4112,7 +4207,7 @@ PrefabInstance: - target: {fileID: 9207926681420349736, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_Size - value: 1 + value: 0.4705884 objectReference: {fileID: 0} - target: {fileID: 9207926681420349736, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} @@ -4157,7 +4252,7 @@ PrefabInstance: - target: {fileID: 9207926681532248490, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} propertyPath: m_AnchoredPosition.x - value: 25777.459 + value: 27560.613 objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 9207926679892754397, guid: b162218cc487f1242bd5ac7b4315a051, type: 3} @@ -4298,12 +4393,12 @@ PrefabInstance: - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8553388048532215990, guid: 884ac57de337c364391b247761071fb1, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 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 6574b6c4cc64aaf84502fe8e3979a252909ade0d..f4fa3f780801052b4b41d65697dc2c72a75ef37a 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/GadgetCanvas.prefab @@ -166,7 +166,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: 1 + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 8883333281790640344} m_Father: {fileID: 7428296641755399516} @@ -174,7 +174,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 940, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &6662492270148709753 @@ -192,6 +192,7 @@ MonoBehaviour: _ActiveGadgetScaleFactor: 0 _GadgetButton: {fileID: 5345241908758045532, guid: 4804ff343c7a9724abfb4587ac7da08a, type: 3} + _GadgetName: {fileID: 6047934600014966487} _ParentMe: {fileID: 0} _Cursor: {fileID: 0} _LineRenderer: {fileID: 0} @@ -318,6 +319,142 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5250976265380185965} m_CullTransparentMesh: 1 +--- !u!1 &6047934600014966487 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5319601506211182557} + - component: {fileID: 2866041150845152866} + - component: {fileID: 316953049318323009} + m_Layer: 5 + m_Name: GadgetName + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5319601506211182557 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047934600014966487} + 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: 2} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 4416234386712880005} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 220.1} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2866041150845152866 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047934600014966487} + m_CullTransparentMesh: 0 +--- !u!114 &316953049318323009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047934600014966487} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + 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: + m_Calls: [] + m_text: Here should be the gadget name + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 3bce71b32a876f54e96869a29b46e150, type: 2} + m_sharedMaterial: {fileID: 5290021301827705759, guid: 3bce71b32a876f54e96869a29b46e150, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + 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_fontSize: 50.2 + m_fontSizeBase: 50.2 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: -126.967285, y: 0, z: -121.74257, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &7010103626960755421 GameObject: m_ObjectHideFlags: 0 @@ -349,6 +486,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7428296641755399516} + - {fileID: 5319601506211182557} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -374,7 +512,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 + m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 m_SortingOrder: 10 m_TargetDisplay: 0 @@ -458,6 +596,11 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 100 objectReference: {fileID: 0} + - target: {fileID: 5770109655396907606, guid: 4804ff343c7a9724abfb4587ac7da08a, + type: 3} + propertyPath: m_LocalScale.z + value: 4 + objectReference: {fileID: 0} - target: {fileID: 5770109655396907606, guid: 4804ff343c7a9724abfb4587ac7da08a, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab b/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab index 03298f2760b0661c2e35beeae01c50201dcb7cd3..d311e78e1c61b4d0c00afb388abd0250e5785a8e 100644 --- a/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab +++ b/Assets/Resources/Prefabs/UI/Ingame/HidingCanvas.prefab @@ -1,5 +1,502 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2520747930949992628 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4623092116721457026} + - component: {fileID: 5540056071855297645} + - component: {fileID: 1345623822099313452} + m_Layer: 5 + m_Name: MMTMessage (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4623092116721457026 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2520747930949992628} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.37, y: 1.115714, z: 0.74} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6417303587324338980} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5540056071855297645 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2520747930949992628} + m_CullTransparentMesh: 1 +--- !u!114 &1345623822099313452 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2520747930949992628} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + 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: + m_Calls: [] + m_text: Hello World + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 3bce71b32a876f54e96869a29b46e150, type: 2} + m_sharedMaterial: {fileID: 5290021301827705759, guid: 3bce71b32a876f54e96869a29b46e150, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278253055 + m_fontColor: {r: 1, g: 0.95904064, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + 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_fontSize: 141.4 + m_fontSizeBase: 141.4 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: -849.3793, y: 0, z: -892.58386, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &2900303399007800751 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5171782508373878537} + - component: {fileID: 6759994692384693062} + - component: {fileID: 1835936846547433619} + m_Layer: 5 + m_Name: Container + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5171782508373878537 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2900303399007800751} + 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: 6417303587324338980} + m_Father: {fileID: 6217514410212639169} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: -0.008544922, y: 0.0002421254} + m_SizeDelta: {x: 1156.8, y: 0} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &6759994692384693062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2900303399007800751} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 7 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &1835936846547433619 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2900303399007800751} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!1 &4629804878839556774 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6217514410212639169} + - component: {fileID: 5540042464801514340} + - component: {fileID: 7865126838152513948} + - component: {fileID: 8664180732195803096} + - component: {fileID: 2091663869036845425} + m_Layer: 5 + m_Name: MMtMessagePopUpCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6217514410212639169 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4629804878839556774} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.702208, y: 0.25208077, z: 2.0809245} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 5171782508373878537} + m_Father: {fileID: 9207926680331850712} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 848.28516, y: 62} + m_SizeDelta: {x: 1156.834, y: 1018.225} + m_Pivot: {x: 1, y: 0} +--- !u!223 &5540042464801514340 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4629804878839556774} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &7865126838152513948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4629804878839556774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &8664180732195803096 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4629804878839556774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &2091663869036845425 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4629804878839556774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a2421aa4aa06234393141eca951efb9, type: 3} + m_Name: + m_EditorClassIdentifier: + canvas: {fileID: 4629804878839556774} + CloseButton: {fileID: 9081536650750380978} + message: {fileID: 1345623822099313452} + ServerErrorMessage: unknown server error + NonTotalMessage: Scroll application not complete + UnknownErrorMessage: Unkown error - did you apply all facts? + InvalidAssignmentMessage: Invalid Assignment +--- !u!1 &9199969215333656634 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6417303587324338980} + - component: {fileID: 6566537308893485442} + - component: {fileID: 6337417588299490976} + - component: {fileID: 2183010594879739666} + - component: {fileID: 9081536650750380978} + m_Layer: 5 + m_Name: MMTMessagePanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6417303587324338980 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9199969215333656634} + 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: 1 + m_Children: + - {fileID: 4623092116721457026} + m_Father: {fileID: 5171782508373878537} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6566537308893485442 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9199969215333656634} + m_CullTransparentMesh: 1 +--- !u!114 &6337417588299490976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9199969215333656634} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.6313726} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &2183010594879739666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9199969215333656634} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 20 + m_Top: 100 + m_Bottom: 100 + m_ChildAlignment: 7 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &9081536650750380978 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9199969215333656634} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6337417588299490976} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: + m_MethodName: + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &9207926679476855463 GameObject: m_ObjectHideFlags: 0 @@ -95,6 +592,7 @@ MonoBehaviour: ScrollPrefab: {fileID: 3173330253721512196, guid: a6a9a3ebdb022e546a21d9f9ff148261, type: 3} DetailScreen: {fileID: 9207926680331850715} + scrollscreenContent: {fileID: 0} x_Start: -240 y_Start: 200 X_Pacece_Between_Items: 105 @@ -990,6 +1488,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d982f30612e9c5c4eb26c1ad0bb859e1, type: 3} m_Name: m_EditorClassIdentifier: + factscreenContent: {fileID: 0} prefab_Point: {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, type: 3} prefab_Distance: {fileID: 4221381813544557775, guid: 8106c748f1aeb084d87fdc71dd009b67, @@ -1002,6 +1501,21 @@ MonoBehaviour: type: 3} prefab_Line: {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, type: 3} + prefab_ParallelLineFact: {fileID: 0} + prefab_RectangleFact: {fileID: 0} + prefab_RadiusFact: {fileID: 0} + prefab_AreaCircle: {fileID: 0} + prefab_ConeVolume: {fileID: 0} + prefab_OrthogonalCircleLine: {fileID: 0} + prefab_TruncatedConeVolume: {fileID: 0} + prefab_RightAngle: {fileID: 0} + prefab_CylinderVolume: {fileID: 0} + prefab_EqualFact: {fileID: 0} + prefab_UnEqualFact: {fileID: 0} + prefab_TestFact: {fileID: 0} + prefab_CircleFact: {fileID: 0} + prefab_OnCircleFact: {fileID: 0} + prefab_AngleCircleLineFact: {fileID: 0} x_Start: -125 y_Start: 475 X_Pacece_Between_Items: 110 @@ -1040,6 +1554,7 @@ RectTransform: m_Children: - {fileID: 9207926680480227026} - {fileID: 9207926679892754396} + - {fileID: 6217514410212639169} m_Father: {fileID: 9207926680489444168} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1071,6 +1586,7 @@ MonoBehaviour: cursor: {fileID: 0} parameterDisplayPrefab: {fileID: 8358525157842135574, guid: 0651df442e07acf439dd439c86c20e93, type: 3} + mmtAnswerPopUp: {fileID: 4629804878839556774} currentMmtAnswer: dynamicScrollDescriptionsActive: 1 automaticHintGenerationActive: 1 @@ -1178,7 +1694,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -0.000015259, y: -283} + m_AnchoredPosition: {x: -0.000015258789, y: -283} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9207926680480227025 @@ -2354,7 +2870,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 9207926681445974878} m_HandleRect: {fileID: 9207926681445974865} m_Direction: 0 - m_Value: 0 + m_Value: 1 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: @@ -2844,7 +3360,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: 0.000030517578} + m_AnchoredPosition: {x: -0.000030517578, y: 0.000030517578} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &9207926681532248488 diff --git a/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab b/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab new file mode 100644 index 0000000000000000000000000000000000000000..b1ba66a5e3eaaa3b843a59a721d5d649d966d20f --- /dev/null +++ b/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab @@ -0,0 +1,215 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1322278105228984217 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6468767882074607594} + - component: {fileID: 7554936746706771893} + - component: {fileID: 7132369167237693548} + m_Layer: 5 + m_Name: MMTMessageScreen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6468767882074607594 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322278105228984217} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 9.186294, y: 0.91161, z: 0.91161} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2141960853456617606} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 971, y: 77.99999} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0, y: 0} +--- !u!222 &7554936746706771893 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322278105228984217} + m_CullTransparentMesh: 1 +--- !u!114 &7132369167237693548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322278105228984217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.39215687} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &9034407406843189266 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2141960853456617606} + - component: {fileID: 6880627111919489379} + - component: {fileID: 8107050443896931067} + m_Layer: 5 + m_Name: MMTMessage(TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2141960853456617606 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9034407406843189266} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.10885783, y: 1.0969602, z: 1.0969602} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6468767882074607594} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1.3, y: -4} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6880627111919489379 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9034407406843189266} + m_CullTransparentMesh: 1 +--- !u!114 &8107050443896931067 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9034407406843189266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + 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: + m_Calls: [] + m_text: Hello World + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 3bce71b32a876f54e96869a29b46e150, type: 2} + m_sharedMaterial: {fileID: 5290021301827705759, guid: 3bce71b32a876f54e96869a29b46e150, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + 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_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: -327.85312, y: 0, z: -362.5219, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab.meta b/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..8247d32e27cdde61011eb647079179775447f026 --- /dev/null +++ b/Assets/Resources/Prefabs/UI/MMTMessageScreen.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dda652157b2fc164fb3c592e58f1bc9e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/UI/Scrolls/ScrollPrefab.prefab b/Assets/Resources/Prefabs/UI/Scrolls/ScrollPrefab.prefab index f9714d443ce04f0cbb2e64f758f15c3e8cf54a27..84e924c59e30009f093ee0254b8ba9816e912e9d 100644 --- a/Assets/Resources/Prefabs/UI/Scrolls/ScrollPrefab.prefab +++ b/Assets/Resources/Prefabs/UI/Scrolls/ScrollPrefab.prefab @@ -785,7 +785,7 @@ GameObject: m_Component: - component: {fileID: 8894159312141808596} - component: {fileID: 8894159312141808598} - - component: {fileID: 8894159312141808597} + - component: {fileID: 8635547783527578908} m_Layer: 5 m_Name: Scroll m_TagString: Untagged @@ -827,7 +827,7 @@ CanvasGroup: m_Interactable: 1 m_BlocksRaycasts: 1 m_IgnoreParentGroups: 0 ---- !u!114 &8894159312141808597 +--- !u!114 &8635547783527578908 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -836,10 +836,57 @@ MonoBehaviour: m_GameObject: {fileID: 8894159312141808595} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a3515765f8985a24b9519ac4af6cfe5d, type: 3} + m_Script: {fileID: 11500000, guid: d982f30612e9c5c4eb26c1ad0bb859e1, type: 3} m_Name: m_EditorClassIdentifier: - initialShow: 1 + factscreenContent: {fileID: 0} + prefab_Point: {fileID: 858001163752551619, guid: f019e9f67e8dab947bc60028223b6cec, + type: 3} + prefab_Distance: {fileID: 4221381813544557775, guid: 8106c748f1aeb084d87fdc71dd009b67, + type: 3} + prefab_Angle: {fileID: 6643637775379894484, guid: 30fcd362f34a9844fba66065924c6143, + type: 3} + prefab_Default: {fileID: 3623208097461608675, guid: f8cb4e8bb9c09724c925b25c660fb2cd, + type: 3} + prefab_OnLine: {fileID: 6050914136827205310, guid: 496d04605465c7f4dba7638cc6e2dc6e, + type: 3} + prefab_Line: {fileID: 7510387096843212865, guid: d6ee990520a44954fb494468665d19e9, + type: 3} + prefab_ParallelLineFact: {fileID: 7510387096843212865, guid: 9f086cfbfeb0dfd46af67395aa17aafa, + type: 3} + prefab_RectangleFact: {fileID: 8156936215466465834, guid: b6f35afcaff5d8a40bf8f792eb3299e6, + type: 3} + prefab_RadiusFact: {fileID: 2513701074329712390, guid: 5b54aca5b2f2bfa48968656ed3bea181, + type: 3} + prefab_AreaCircle: {fileID: 7016901710118546043, guid: 210f1e1acf16abf40a39587074c4d25a, + type: 3} + prefab_ConeVolume: {fileID: 2523593828849809055, guid: 992edeb4264d0fa49b0f9b35b9ab85ce, + type: 3} + prefab_OrthogonalCircleLine: {fileID: 8554350198830106250, guid: 9ce7444f588cd054989126eaff75c5f3, + type: 3} + prefab_TruncatedConeVolume: {fileID: 4123133807278660472, guid: 9d0019fa4b5725a49bdfc78c4d67661e, + type: 3} + prefab_RightAngle: {fileID: 3080888058940174091, guid: 389563c758e86d848b3341576b90b7e4, + type: 3} + prefab_CylinderVolume: {fileID: 5287418535931939099, guid: 30d09e8685950994893b3b6388a8906c, + type: 3} + prefab_EqualFact: {fileID: 7523305359074541435, guid: 5f461930be2eb074193dc12eb60e10b2, + type: 3} + prefab_UnEqualFact: {fileID: 5769925203401971992, guid: 047cd3a517f781846a1f983394b4bb7b, + type: 3} + prefab_TestFact: {fileID: 2846439484187545958, guid: 5dc76e187eae4214697491bfb42773e8, + type: 3} + prefab_CircleFact: {fileID: 6636443472981757786, guid: 9d08fd45bc83c7c42a9be42f5309c6c2, + type: 3} + prefab_OnCircleFact: {fileID: 2115817999818309900, guid: df93bd4d977e4ab42a626f7bd06596d6, + type: 3} + prefab_AngleCircleLineFact: {fileID: 4902928549420802332, guid: 62cec72d28de59d4c8ae782957cc10a1, + type: 3} + x_Start: 0 + y_Start: 0 + X_Pacece_Between_Items: 0 + y_Pacece_Between_Items: 0 + number_of_Column: 0 --- !u!1 &8894159312286264417 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ScriptableObjects/DataContainerGadgetCollection.cs b/Assets/ScriptableObjects/DataContainerGadgetCollection.cs index 63f857eaee9cdae2d12ff6a38d37e15e10be7b33..e8af7e32d832f4f587379a822e3e0a68615524b3 100644 --- a/Assets/ScriptableObjects/DataContainerGadgetCollection.cs +++ b/Assets/ScriptableObjects/DataContainerGadgetCollection.cs @@ -8,6 +8,8 @@ public class DataContainerGadgetCollection : ScriptableObject, ISerializationCal { public Material[] Materials; public Sprite[] ButtonSprites; + public string[] GadgetNames; + public Dictionary<Gadget.GadgetIDs, DataContainerGadgetInit> DataContainerGadgetDict = new(); [SerializeField] diff --git a/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset b/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset index b5fd0b7084dffbf188fa3d93f75c0d516bf36b4d..92c159de8ac9a209ad8a4c85cd7aee231cb99897 100644 --- a/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset +++ b/Assets/ScriptableObjects/GadgetDataContainerGadgetCollection.asset @@ -26,6 +26,19 @@ MonoBehaviour: - {fileID: 21300000, guid: 64638854d11ebae43b37782de9c88be7, type: 3} - {fileID: 21300000, guid: d456617ba2282854d9570dcebcc2b279, type: 3} - {fileID: 21300000, guid: e35797aede3d7bd449ca9195a409b0cc, type: 3} + - {fileID: 21300000, guid: 9831128faf2531e4cba52f58894091be, type: 3} + GadgetNames: + - undefined + - Point Tool + - Tape Tool + - Angle Tool + - Line Tool + - Lot Tool + - Pendulum + - Pole Tool + - Remover + - Equal Circles + - Middle Point GadgetType: ffffffff00000000010000000200000003000000040000000500000006000000070000000800000009000000 GadgetData: - {fileID: 11400000, guid: 7431ff31b707d2a4082b65b61e15e5df, type: 2} diff --git a/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset b/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset new file mode 100644 index 0000000000000000000000000000000000000000..e0a620a3daf315c234bc76b46a8f51c3762c7d69 --- /dev/null +++ b/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset @@ -0,0 +1,26 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 262a3c8caea4a7741b65ef20c568f5c2, type: 3} + m_Name: MiddlePointDataContainerGadgetInit + m_EditorClassIdentifier: + Rank: 10 + MaxRange: Infinity + MaxHeight: Infinity + UiName: Middle Point Tool + MaterialIndx: 0 + ButtonIndx: 10 + IgnoreLayerMask: + serializedVersion: 2 + m_Bits: 64002 + SecondaryLayerMask: + serializedVersion: 2 + m_Bits: 0 diff --git a/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset.meta b/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset.meta new file mode 100644 index 0000000000000000000000000000000000000000..a8fa31b651b87cf4f189ec184286f2b802279922 --- /dev/null +++ b/Assets/ScriptableObjects/MiddlePointDataContainerGadgetInit.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35d3197399dc8374280464a237271ac5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs index b66908d82fea13ab42d8542850975756b8f48e2a..72a3a3764b2d3e4e7c4a7d49c28c7a49ccb0de3d 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; @@ -17,9 +18,11 @@ public class GadgetBehaviour : MonoBehaviour, ISerializationCallbackReceiver public static WorldCursor Cursor; public static LineRenderer LineRenderer; public static GameObject GadgetButton; + public static GameObject GadgetName; public static GameObject ParentMe; public static Material[] Materials; public static Sprite[] ButtonSprites; + public static String[] ButtonNames; public static Dictionary<Gadget.GadgetIDs, DataContainerGadgetInit> DataContainerGadgetDict; @@ -37,6 +40,7 @@ public class GadgetBehaviour : MonoBehaviour, ISerializationCallbackReceiver [SerializeField] private float _ActiveGadgetScaleFactor; [SerializeField] private GameObject _GadgetButton; + [SerializeReference] private GameObject _GadgetName; [SerializeField] private GameObject _ParentMe; [SerializeField] private WorldCursor _Cursor; [SerializeField] private LineRenderer _LineRenderer; @@ -50,11 +54,13 @@ public void OnAfterDeserialize() Cursor = _Cursor; LineRenderer = _LineRenderer; GadgetButton = _GadgetButton; + GadgetName = _GadgetName; ParentMe = _ParentMe; #pragma warning disable UNT0008 // Null propagation on Unity objects Materials = _DataContainerGadgetDict?.Materials ?? new Material[0]; ButtonSprites = _DataContainerGadgetDict?.ButtonSprites ?? new Sprite[0]; + ButtonNames = _DataContainerGadgetDict?.GadgetNames ?? new string[0]; DataContainerGadgetDict = _DataContainerGadgetDict?.DataContainerGadgetDict ?? new(); #pragma warning restore UNT0008 // Null propagation on Unity objects } @@ -110,7 +116,7 @@ void CreateButton(int gid) buttons = new Button[gadgets.Length]; - Debug.Log("GadjetsNr: " + gadgets.Length); + //Debug.Log("GadjetsNr: " + gadgets.Length); for (int i = 0; i < gadgets.Length; i++) { @@ -121,6 +127,8 @@ void CreateButton(int gid) ActiveGadgetInd = 0; buttons[0].transform.localScale *= ActiveGadgetScaleFactor; + GadgetName = _GadgetName; + ActivateGadget(0); } @@ -169,9 +177,11 @@ public static void ActivateGadget(int gid) buttons[ActiveGadgetInd].transform.localScale /= ActiveGadgetScaleFactor; gadgets[ActiveGadgetInd].Disable(); + ActiveGadgetInd = gid; //buttons[gid].animator.StartPlayback(); buttons[gid].transform.localScale *= ActiveGadgetScaleFactor; + GadgetName.GetComponent<TMP_Text>().text = ButtonNames[gadgets[gid].ButtonIndx]; gadgets[gid].Enable(); OnHit = gadgets[gid].Hit; diff --git a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs new file mode 100644 index 0000000000000000000000000000000000000000..f697556a58e3d65a2e8c9c83dfe33fb75b1bf200 --- /dev/null +++ b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs @@ -0,0 +1,70 @@ +using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class TestMiddlePoint : Gadget +{ + /// \copydoc Gadget.s_type + [JsonProperty] + protected static new string s_type = "MiddleTool"; + + //Cache for drawing Line + private readonly Vector3[] LineOrigin = new Vector3[1]; + + public override void _Hit(RaycastHit[] hit) + { + if(hit[0].transform.gameObject.layer != LayerMask.NameToLayer("Point")) + return; + + string tempFactId = hit[0].transform.GetComponent<FactObject>().URI; //clicked point point is added to Workflow + if (!Workflow.Contains(tempFactId)) + Workflow.Add(tempFactId); + + switch (Workflow.Count) + { + case 1: //only one point selected so far + LineOrigin[0] = hit[0].transform.position; + ActivateLineDrawing(); + break; + + case 2: + //FactManager.AddLineFact(Workflow[0], Workflow[1], gadget: this); + + //Insert point in the middle + Vector3 middle = new Vector3(); + PointFact p1 = (PointFact)StageStatic.stage.factState[Workflow[0]]; + PointFact p2 = (PointFact)StageStatic.stage.factState[Workflow[1]]; + + middle = p1.Point + (p2.Point - p1.Point) * 0.5f; + + //Debug.Log("p1:" + p1.Point); + //Debug.Log("middle:" + middle); + //Debug.Log("p2:" + p2.Point); + + + FactManager.AddPointFact(middle, Vector3.up); + ResetGadget(); + return; + } + } + + protected override void _ActivateLineDrawing() + { + GadgetBehaviour.LineRenderer.enabled = true; + GadgetBehaviour.LineRenderer.positionCount = 2; + + GadgetBehaviour.LineRenderer.startWidth = 0.095f; + GadgetBehaviour.LineRenderer.endWidth = 0.095f; + //Add the position of the Fact for the start of the Line + SetPosition(0, LineOrigin[0]); + //The second point is the same point at the moment + SetPosition(1, LineOrigin[0]); + } + + //Updates the second-point of the Line when First Point was selected in LineMode + protected override void _UpdateLineDrawing() + { + SetPosition(1, GadgetBehaviour.Cursor.transform.position); + } +} diff --git a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs.meta b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..dc8abb900da7ae31f48964cdcd44ba5047d10be1 --- /dev/null +++ b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ddd82a8f676e9bf4eb3d17b86ecd0e64 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png b/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png new file mode 100644 index 0000000000000000000000000000000000000000..7fa3867baed34f88118756bfaec69de125e87630 --- /dev/null +++ b/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25877e7e0b109d6ae7b5d2913199705bdf1bd20db8291bd95a9a87dcef1c325f +size 3459 diff --git a/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png.meta b/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..4e90232677964f09c9f9dca7ce4fe98f740cf497 --- /dev/null +++ b/Assets/Scripts/InventoryStuff/Items/images/MiddlePoint.png.meta @@ -0,0 +1,122 @@ +fileFormatVersion: 2 +guid: 9831128faf2531e4cba52f58894091be +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/InventoryStuff/ScrollDetails.cs b/Assets/Scripts/InventoryStuff/ScrollDetails.cs index 4017be6b644d75c0d9265a8e55216095aac39d71..4106ffad2883967595e7106832bfd00197d1d0fb 100644 --- a/Assets/Scripts/InventoryStuff/ScrollDetails.cs +++ b/Assets/Scripts/InventoryStuff/ScrollDetails.cs @@ -11,6 +11,7 @@ public class ScrollDetails : MonoBehaviour public WorldCursor cursor; public GameObject parameterDisplayPrefab; public Scroll ActiveScroll; + public GameObject mmtAnswerPopUp; public static List<GameObject> ParameterDisplays; private static List<Scroll.ScrollAssignment> LatestCompletions; @@ -28,6 +29,8 @@ void Start() ScrollFactHintEvent.AddListener(animateHint); NewAssignmentEvent.AddListener(newAssignmentTrigger); + + mmtAnswerPopUp.GetComponent<PopupBehavior>().hidePopUp(); } public void setScroll(Scroll s) @@ -36,6 +39,7 @@ public void setScroll(Scroll s) Transform originalScrollView = originalScroll.GetChild(1); Transform originalViewport = originalScrollView.GetChild(0); this.ActiveScroll = s; + originalScroll.GetChild(0).GetComponent<TextMeshProUGUI>().text = s.description; //Clear all current ScrollFacts @@ -56,6 +60,11 @@ public void setScroll(Scroll s) ParameterDisplays.Add(originalObj); } + + //set active scroll for ErrorMessagePopup + PopupBehavior popup = mmtAnswerPopUp.GetComponent<PopupBehavior>(); + popup.setScroll(this.ActiveScroll); + popup.setParameterDisplays(ParameterDisplays); } public void magicButtonTrigger() { @@ -66,17 +75,17 @@ IEnumerator magicButton() { //Non blocking wait till sendView() is finished yield return sendView("/scroll/apply"); - if (currentMmtAnswer == null) { - Debug.Log("DAS HAT NICHT GEKLAPPT"); - //TODO: hier ne Art PopUp, wo drin steht, dass das nicht geklappt hat - PushoutFactFailEvent.Invoke(null); + Debug.Log("DAS HAT NICHT GEKLAPPT"); + PushoutFactFailEvent.Invoke(null, null); } else { Debug.Log(currentMmtAnswer); Scroll.ScrollApplicationInfo pushout = JsonConvert.DeserializeObject<Scroll.ScrollApplicationInfo>(currentMmtAnswer); + if (pushout.acquiredFacts.Count == 0) + PushoutFactFailEvent.Invoke(null, pushout); readPushout(pushout.acquiredFacts); } } @@ -94,7 +103,6 @@ IEnumerator newAssignment() if (currentMmtAnswer == null) { Debug.Log("DAS HAT NICHT GEKLAPPT"); - } else { @@ -169,9 +177,6 @@ private string prepareScrollAssignments() private void readPushout(List<Scroll.ScrollFact> pushoutFacts) { - if(pushoutFacts.Count == 0) - PushoutFactFailEvent.Invoke(null); - bool samestep = false; for (int i = 0; i < pushoutFacts.Count; i++, samestep = true) { @@ -179,12 +184,17 @@ private void readPushout(List<Scroll.ScrollFact> pushoutFacts) //Debug.Log(pushoutFacts.Count); //Debug.Log("StartUri " +pushoutFacts[i].getType()+ " over"); //Debug.Log("Applicant" + pushoutFacts[i].getApplicant() + " over"); + + //close error Window + this.mmtAnswerPopUp.GetComponent<PopupBehavior>().hidePopUp(); + string type = pushoutFacts[i].getType(); Fact newFact = ParsingDictionary.parseFactDictionary[pushoutFacts[i].getType()].Invoke(pushoutFacts[i]); if (newFact != null) { - PushoutFactEvent.Invoke(FactManager.AddFactIfNotFound(newFact, out _, samestep, null, ActiveScroll.label) - , FactObject.FactMaterials.Solution); + PushoutFactEvent.Invoke(FactManager.AddFactIfNotFound(newFact, out _, samestep, null, ActiveScroll.label), FactObject.FactMaterials.Solution); + //PushoutFactEvent.Invoke(FactManager.AddFactIfNotFound(newFact, out _, samestep, null, ActiveScroll.label)); + } else { Debug.Log("Parsing on pushout-fact returned null -> One of the dependent facts does not exist"); @@ -271,7 +281,7 @@ public void animateHint(GameObject scrollParameter, string scrollParameterUri) { //Animate ScrollParameter scrollParameter.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger(); //Animate Fact in FactPanel - AnimateExistingFactEvent.Invoke(fact); + AnimateExistingFactEvent.Invoke(fact, FactObject.FactMaterials.Hint); } } else if (LatestRenderedHints.Exists(x => x.Id.Equals(scrollParameterUri))) @@ -287,7 +297,7 @@ public void animateHint(GameObject scrollParameter, string scrollParameterUri) { //Animate ScrollParameter scrollParameter.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger(); //Animate Fact in FactPanel - AnimateExistingFactEvent.Invoke(existingFact); + AnimateExistingFactEvent.Invoke(existingFact, FactObject.FactMaterials.Hint); } //If not -> Generate a Fact-Representation with such dependent facts else @@ -300,6 +310,12 @@ public void animateHint(GameObject scrollParameter, string scrollParameterUri) { } } + public void animateInvalidAssignedFact(GameObject scrollParameter) + { + //Animate ScrollParameter + scrollParameter.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger(); + } + public void animateScrollParameter(string label) { var obj = ParameterDisplays.Find(x => x.transform.GetChild(0).GetComponent<RenderedScrollFact>().Label == label); diff --git a/Assets/Scripts/UI/InGame/PopupBehavior.cs b/Assets/Scripts/UI/InGame/PopupBehavior.cs new file mode 100644 index 0000000000000000000000000000000000000000..48beb882edc05ab6dd8f4b18fcd558224ddbada0 --- /dev/null +++ b/Assets/Scripts/UI/InGame/PopupBehavior.cs @@ -0,0 +1,156 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using TMPro; +using UnityEngine.UI; +using static JSONManager; + +public class PopupBehavior : MonoBehaviour +{ + + [SerializeField] GameObject canvas; + [SerializeField] Button CloseButton; + [SerializeField] TMP_Text message; + + private Scroll activeScroll; + private List<GameObject> parameterDisplays; + + public string ServerErrorMessage = "unknown server error"; + public string NonTotalMessage = "Scroll application not complete"; + public string UnknownErrorMessage = "Unkown error - did you apply all facts?"; + public string InvalidAssignmentMessage = "Invalid Assignment"; + + private string errorMessage = ""; + // Start is called before the first frame update + void Awake() + { + CommunicationEvents.PushoutFactFailEvent.AddListener(onFailedScrollInput); + + CloseButton.onClick.RemoveAllListeners(); + CloseButton.onClick.AddListener(hidePopUp); + } + + public void setMessage(string errorMessage) + { + this.message.text = errorMessage; + } + + public void setScroll(Scroll scroll) + { + this.activeScroll = scroll; + } + public void setParameterDisplays(List<GameObject> parameters) + { + this.parameterDisplays = parameters; + } + + public void showPopUp() + { + canvas.SetActive(true); + StartCoroutine(hideAfter5sec()); + } + + private IEnumerator hideAfter5sec() + { + yield return new WaitForSeconds(5); + hidePopUp(); + } + + public void hidePopUp() + { + canvas.SetActive(false); + } + + public void onFailedScrollInput(Fact startfact, Scroll.ScrollApplicationInfo errorInfo) + { + setMessage(generateHelpfulMessage(errorInfo)); + showPopUp(); + } + + private string generateHelpfulMessage(Scroll.ScrollApplicationInfo errorInfo) + { + if(errorInfo == null) + { + return ServerErrorMessage; + } + int invAssCount = 0; + errorMessage = ""; + for (int i = 0; i < errorInfo.errors.Length; i++) { + Scroll.ScrollApplicationCheckingError error = errorInfo.errors[i]; + + if (error.kind == "nonTotal") + { + errorMessage += NonTotalMessage; + errorMessage += '\n'; + } else if (error.kind == "invalidAssignment") + { + invAssCount++; + Scroll.ScrollFact fact = parseFactFromError(error); + foreach (GameObject g in parameterDisplays) + { + RenderedScrollFact scrollfact = g.transform.GetChild(0).GetComponent<RenderedScrollFact>(); + if(scrollfact.factUri == fact.@ref.uri) + { + scrollfact.ScrollParameterObject.GetComponentInChildren<ImageHintAnimation>().AnimationTrigger(); + } + } + } else if (error.kind == "unknown") + { + errorMessage += UnknownErrorMessage; + errorMessage += '\n'; + } + } + + //invalid assignment message + if(invAssCount > 0) + { + errorMessage += invAssCount.ToString() + " " + InvalidAssignmentMessage; + if(invAssCount > 1) //plural for invalid assignments + { + errorMessage += 's'; + } + errorMessage += '\n'; + } + + return errorMessage; + } + + //this should be changed, the Fact Object should be parsed by JSON. This is a workaround because the MMT servers JSON serialization contains a bug + private Scroll.ScrollFact parseFactFromError(Scroll.ScrollApplicationCheckingError error) + { + if(error == null || error.msg == null) + { + return null; + } + string message = error.msg; + + //cut start of string + int indexFact = message.IndexOf('['); + string factUri = message.Substring(indexFact + 1); + + // cut end of string + int indexFactEnd = factUri.IndexOf(']'); + string rest = factUri.Substring(indexFactEnd); + factUri = factUri.Substring(0, indexFactEnd); + + //get fact Label from the rest of the string + int factNameLength = rest.IndexOf('?') - 2; + string factLabel = rest.Substring(2, factNameLength); + + //add ?factName URI + factUri += "?" + factLabel; + + //Debug.Log("Parsed URI: " + factUri + " parsed fact label: " + factLabel); + + foreach (Scroll.ScrollFact f in activeScroll.requiredFacts) + { + //Debug.Log("KIND: " + f.kind + " Label: " + f.label + " Uri: " + f.@ref.uri); + //Debug.Log("Uri: " + f.@ref.uri); + if (f.@ref.uri.Equals(factUri)) + { + return f; + } + } + return null; + } +} diff --git a/Assets/Scripts/UI/InGame/PopupBehavior.cs.meta b/Assets/Scripts/UI/InGame/PopupBehavior.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d3cc2e758ea043c0276725c823c3dcc62b3d147c --- /dev/null +++ b/Assets/Scripts/UI/InGame/PopupBehavior.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a2421aa4aa06234393141eca951efb9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: