From 10e3ab6dd2384a6738f53889297cbb27683662c8 Mon Sep 17 00:00:00 2001 From: beni-T-52 <81741592+beni-T-52@users.noreply.github.com> Date: Wed, 4 May 2022 15:11:28 +0200 Subject: [PATCH] started state machines --- Assets/Macros.meta | 8 + Assets/Macros/DoorStateMachine.asset | 17 ++ Assets/Macros/DoorStateMachine.asset.meta | 8 + Assets/Macros/StonetileStateMachine.asset | 18 ++ .../Macros/StonetileStateMachine.asset.meta | 8 + Assets/Scenes/ZenSpace.unity | 204 ++++++++++++++++++ 6 files changed, 263 insertions(+) create mode 100644 Assets/Macros.meta create mode 100644 Assets/Macros/DoorStateMachine.asset create mode 100644 Assets/Macros/DoorStateMachine.asset.meta create mode 100644 Assets/Macros/StonetileStateMachine.asset create mode 100644 Assets/Macros/StonetileStateMachine.asset.meta diff --git a/Assets/Macros.meta b/Assets/Macros.meta new file mode 100644 index 0000000..93d3b65 --- /dev/null +++ b/Assets/Macros.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3464a60847a7ff479196f4249ca7f9b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Macros/DoorStateMachine.asset b/Assets/Macros/DoorStateMachine.asset new file mode 100644 index 0000000..5f47be1 --- /dev/null +++ b/Assets/Macros/DoorStateMachine.asset @@ -0,0 +1,17 @@ +%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: 1083378141, guid: dcd2196c4e9166f499793f2007fcda35, type: 3} + m_Name: DoorStateMachine + m_EditorClassIdentifier: + _data: + _json: '{"graph":{"title":null,"summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"nest":{"source":"Embed","macro":null,"embed":{"variables":{"collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"closed","summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":-215.0},"guid":"5990480f-a576-4a8a-8011-00e227243c6d","$version":"A","$type":"Bolt.OnEnterState"},{"coroutine":false,"defaultValues":{},"position":{"x":-161.0,"y":-38.0},"guid":"fb6d35e7-a2ab-4abb-9f56-6ddce0b09429","$version":"A","$type":"Bolt.Update"},{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":145.0},"guid":"14dd4a84-51fb-41b8-889e-13accd58f530","$version":"A","$type":"Bolt.OnExitState"}],"$version":"A"}},"isStart":true,"position":{"x":-412.0,"y":-105.0},"width":170.0,"guid":"1f6d09e3-e0e9-4802-abb4-dd239c6de5aa","$version":"A","$type":"Bolt.FlowState","$id":"3"},{"nest":{"source":"Embed","macro":null,"embed":{"variables":{"collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"open","summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":-215.0},"guid":"7a7807f6-3109-4fbc-9c29-d5536f0b4921","$version":"A","$type":"Bolt.OnEnterState"},{"coroutine":false,"defaultValues":{},"position":{"x":-161.0,"y":-38.0},"guid":"56ee03c9-351e-4955-98ba-e49e680dbbbf","$version":"A","$type":"Bolt.Update"},{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":145.0},"guid":"32f47e3a-c4f4-4f55-8cb4-b0a5d353dc45","$version":"A","$type":"Bolt.OnExitState"}],"$version":"A"}},"isStart":false,"position":{"x":44.0,"y":-90.0},"width":170.0,"guid":"ccc5bda1-cd6f-4210-a4b3-d77a0d359dd5","$version":"A","$type":"Bolt.FlowState","$id":"19"},{"nest":{"source":"Embed","macro":null,"embed":{"variables":{"collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":null,"summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"defaultValues":{},"position":{"x":100.0,"y":-50.0},"guid":"11ac9a13-585b-468b-bad1-acd1782d04c4","$version":"A","$type":"Bolt.TriggerStateTransition"},{"specifyFallback":false,"kind":"Scene","defaultValues":{"name":{"$content":"StoneTilePressed","$type":"System.String"}},"position":{"x":-486.0,"y":35.0},"guid":"965ff06d-25d1-4a27-af9a-6f6456a8d62c","$version":"A","$type":"Bolt.GetVariable","$id":"47"},{"numeric":false,"defaultValues":{},"position":{"x":-188.0,"y":-80.0},"guid":"38928307-c8f4-461e-9466-7f60f04926e3","$version":"A","$type":"Bolt.Equal","$id":"49"},{"member":{"name":"TrueString","parameterTypes":null,"targetType":"System.Boolean","targetTypeName":"System.Boolean","$version":"A"},"defaultValues":{},"position":{"x":-456.0,"y":-161.0},"guid":"bbb0ccfd-3a56-4c75-ad05-fc30267466e6","$version":"A","$type":"Bolt.GetMember","$id":"51"},{"coroutine":false,"defaultValues":{},"position":{"x":-367.0,"y":-301.0},"guid":"5f3e4ca8-078e-4684-b75d-9928c84d22be","$version":"A","$type":"Bolt.FixedUpdate"},{"sourceUnit":{"$ref":"51"},"sourceKey":"value","destinationUnit":{"$ref":"49"},"destinationKey":"a","guid":"2af553f9-663e-4c98-ba51-e974a11d40c0","$type":"Bolt.ValueConnection"},{"sourceUnit":{"$ref":"47"},"sourceKey":"value","destinationUnit":{"$ref":"49"},"destinationKey":"b","guid":"e062a99f-2875-457c-9773-8f22b83d5159","$type":"Bolt.ValueConnection"}],"$version":"A"}},"source":{"$ref":"3"},"destination":{"$ref":"19"},"guid":"ddaa8716-141a-4e21-a51d-d6d202a2e23f","$version":"A","$type":"Bolt.FlowStateTransition"}],"$version":"A"}}' + _objectReferences: [] diff --git a/Assets/Macros/DoorStateMachine.asset.meta b/Assets/Macros/DoorStateMachine.asset.meta new file mode 100644 index 0000000..39a60c8 --- /dev/null +++ b/Assets/Macros/DoorStateMachine.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71804b8c23a12cb4a9c1c6009a5ed39d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Macros/StonetileStateMachine.asset b/Assets/Macros/StonetileStateMachine.asset new file mode 100644 index 0000000..9aa41cf --- /dev/null +++ b/Assets/Macros/StonetileStateMachine.asset @@ -0,0 +1,18 @@ +%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: 1083378141, guid: dcd2196c4e9166f499793f2007fcda35, type: 3} + m_Name: StonetileStateMachine + m_EditorClassIdentifier: + _data: + _json: '{"graph":{"title":null,"summary":null,"pan":{"x":208.0,"y":35.25},"zoom":0.9,"elements":[{"nest":{"source":"Embed","macro":null,"embed":{"variables":{"collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"Normal","summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":-215.0},"guid":"3b040b1f-01c4-4e2c-b0eb-e7c2eeef4d4e","$version":"A","$type":"Bolt.OnEnterState"},{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":145.0},"guid":"43f211f4-a0af-4eb2-9189-369ac9dee611","$version":"A","$type":"Bolt.OnExitState"}],"$version":"A"}},"isStart":true,"position":{"x":-305.0,"y":1.0},"width":170.0,"guid":"90bfeb2c-6282-48f6-97f3-911a16d76f7c","$version":"A","$type":"Bolt.FlowState"},{"nest":{"source":"Embed","macro":null,"embed":{"variables":{"collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"pressed + Down","summary":null,"pan":{"x":-114.6436,"y":-46.42422},"zoom":0.55,"elements":[{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":-215.0},"guid":"74ea6399-4f72-45c5-bffb-288ebc5cc1e9","$version":"A","$type":"Bolt.OnEnterState"},{"coroutine":false,"defaultValues":{},"position":{"x":-205.0,"y":145.0},"guid":"9e91ddd2-1b31-4a88-8128-7a3b7f6553b0","$version":"A","$type":"Bolt.OnExitState"}],"$version":"A"}},"isStart":false,"position":{"x":263.0,"y":-6.0},"width":170.0,"guid":"d1439ec0-b9c3-4404-bcf8-9369c5706249","$version":"A","$type":"Bolt.FlowState"}],"$version":"A"}}' + _objectReferences: [] diff --git a/Assets/Macros/StonetileStateMachine.asset.meta b/Assets/Macros/StonetileStateMachine.asset.meta new file mode 100644 index 0000000..c7c1031 --- /dev/null +++ b/Assets/Macros/StonetileStateMachine.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4a933a3464986b41a7a033cc434e549 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ZenSpace.unity b/Assets/Scenes/ZenSpace.unity index bdbe50a..0d200e1 100644 --- a/Assets/Scenes/ZenSpace.unity +++ b/Assets/Scenes/ZenSpace.unity @@ -14616,6 +14616,7 @@ Transform: - {fileID: 1906945513} - {fileID: 123432288} - {fileID: 118216610} + - {fileID: 2129167814} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -14743,6 +14744,22 @@ MonoBehaviour: _data: _json: '{"declarations":{"collection":{"$content":[],"$version":"A"},"$version":"A"}}' _objectReferences: [] +--- !u!114 &1229177888 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1229177886} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1999370065, guid: dcd2196c4e9166f499793f2007fcda35, type: 3} + m_Name: + m_EditorClassIdentifier: + _data: + _json: '{"nest":{"source":"Macro","macro":0,"embed":null}}' + _objectReferences: + - {fileID: 11400000, guid: e4a933a3464986b41a7a033cc434e549, type: 2} --- !u!1 &1229887433 stripped GameObject: m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: cffe1e828c59eb644ae9b6e8407d05bd, type: 3} @@ -16926,6 +16943,65 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8975d2caafaf01b469ddc36244120e00, type: 3} +--- !u!1 &1792955024 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1792955027} + - component: {fileID: 1792955026} + - component: {fileID: 1792955025} + m_Layer: 0 + m_Name: Scene Variables + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1792955025 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1792955024} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 995777834, guid: c8d0ad23af520fe46aabe2b1fecf6462, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1792955026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1792955024} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1465209106, guid: c8d0ad23af520fe46aabe2b1fecf6462, type: 3} + m_Name: + m_EditorClassIdentifier: + _data: + _json: '{"declarations":{"collection":{"$content":[{"name":"StoneTilePressed","value":{"$content":false,"$type":"System.Boolean"},"$version":"A"}],"$version":"A"},"$version":"A"}}' + _objectReferences: [] +--- !u!4 &1792955027 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1792955024} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &1818040510 stripped Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8975d2caafaf01b469ddc36244120e00, type: 3} @@ -18209,6 +18285,134 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8975d2caafaf01b469ddc36244120e00, type: 3} m_PrefabInstance: {fileID: 1266184538} m_PrefabAsset: {fileID: 0} +--- !u!1 &2129167813 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2129167814} + - component: {fileID: 2129167819} + - component: {fileID: 2129167818} + - component: {fileID: 2129167817} + - component: {fileID: 2129167816} + - component: {fileID: 2129167815} + m_Layer: 0 + m_Name: Door1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2129167814 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 4.342, y: 8.67, z: 4.86} + m_LocalScale: {x: 3.0253, y: 2.2208, z: 0.32081} + m_Children: [] + m_Father: {fileID: 1192080123} + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2129167815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1999370065, guid: dcd2196c4e9166f499793f2007fcda35, type: 3} + m_Name: + m_EditorClassIdentifier: + _data: + _json: '{"nest":{"source":"Macro","macro":0,"embed":null}}' + _objectReferences: + - {fileID: 11400000, guid: 71804b8c23a12cb4a9c1c6009a5ed39d, type: 2} +--- !u!114 &2129167816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1465209106, guid: c8d0ad23af520fe46aabe2b1fecf6462, type: 3} + m_Name: + m_EditorClassIdentifier: + _data: + _json: '{"declarations":{"collection":{"$content":[],"$version":"A"},"$version":"A"}}' + _objectReferences: [] +--- !u!65 &2129167817 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2129167818 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2129167819 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129167813} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &2134736056 PrefabInstance: m_ObjectHideFlags: 0