From 49a709b3c4ec1754b2d81b7828dba9293383fda3 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 14:30:29 +0900 Subject: [PATCH 01/13] =?UTF-8?q?=ED=95=98=EC=9D=B4=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EC=95=84=EC=9B=83=EB=9D=BC=EC=9D=B8,=20=EC=9B=94?= =?UTF-8?q?=EB=93=9C=20UI=20=EB=A0=8C=EB=8D=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Settings/PC_Renderer.asset | 2 +- .../Common/RestaurantOrder.prefab | 70 +++++++++-- .../Interactables/Prop_CustomerTable.prefab | 112 +++++++++++++++++- .../_Addressables/Prefabs/CustomerNpc.prefab | 4 +- .../Restaurant/Character/Npc/NpcMovement.cs | 2 +- .../Event/Cosmetic/InteractableHighlight.cs | 5 + 6 files changed, 180 insertions(+), 15 deletions(-) diff --git a/Assets/Settings/PC_Renderer.asset b/Assets/Settings/PC_Renderer.asset index 817b39bc3..b9ebf5fac 100644 --- a/Assets/Settings/PC_Renderer.asset +++ b/Assets/Settings/PC_Renderer.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:128038ec4bebf184e3e25685d6ba8b93d1185d041df5a4d32f55d434ae3c89f8 +oid sha256:0fbc5c82e6400866f12f4a776985d65f98c1a9e27d9c5104d528026b30388f47 size 10883 diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index da054320c..09b034e02 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 3857692527302447930} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.4, y: 0, z: 0} + m_LocalPosition: {x: -0.5, y: -0.165, z: -0.1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -102,6 +102,7 @@ GameObject: - component: {fileID: 29040892075516248} - component: {fileID: 1332098886975329103} - component: {fileID: 3786917981383564029} + - component: {fileID: 1886819858489010523} m_Layer: 7 m_Name: RestaurantOrder m_TagString: Untagged @@ -252,26 +253,26 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4103096974375017811} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3} m_Name: m_EditorClassIdentifier: _availableStyle: Color: {r: 1, g: 1, b: 1, a: 1} - Width: 1 + Width: 0.5 Opacity: 1 _focusedStyle: Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - Width: 1 + Width: 0.5 Opacity: 1 _unavailableStyle: Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} Width: 0.5 - Opacity: 1 + Opacity: 0.5 _objectiveStyle: Color: {r: 0, g: 1, b: 1, a: 1} - Width: 1 + Width: 0.5 Opacity: 1 _breathingSpeed: 2 _breathingRange: 0.3 @@ -479,9 +480,64 @@ MonoBehaviour: seeThroughTextureUVSpace: 0 seeThroughTextureScale: 1 seeThroughChildrenSortingMode: 0 - rmsCount: 1 + rmsCount: 2 hitFxInitialIntensity: 0 hitFxMode: 0 hitFxFadeOutDuration: 0.25 hitFxColor: {r: 1, g: 1, b: 1, a: 1} hitFxRadius: 0.5 +--- !u!212 &1886819858489010523 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} + 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: c607300554a0c44469620484fccbf239, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 5.12, y: 5.12} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab index 2a2467dee..15b6b6071 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab @@ -8,17 +8,69 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 8881739536043914635} m_Modifications: + - target: {fileID: 29040892075516248, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: serializationData.Prefab + value: + objectReference: {fileID: 29040892075516248, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.y + value: -0.165 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.z + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Radius + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.y + value: -0.165 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.z + value: 0.1 + objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.x value: 0.2 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.y - value: 0.25 + value: 0.2 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.z - value: 0.2 + value: 0.165 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalRotation.w @@ -70,17 +122,69 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 8881739536043914635} m_Modifications: + - target: {fileID: 29040892075516248, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: serializationData.Prefab + value: + objectReference: {fileID: 29040892075516248, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.y + value: -0.165 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.z + value: -0.1 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1664322405549350652, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Radius + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.x + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.y + value: -0.165 + objectReference: {fileID: 0} + - target: {fileID: 2950132940454135295, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Center.z + value: -0.1 + objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.x value: -0.2 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.y - value: 0.25 + value: 0.2 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalPosition.z - value: 0.2 + value: 0.165 objectReference: {fileID: 0} - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} propertyPath: m_LocalRotation.w diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 234795d0e..4e2728746 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -1947,9 +1947,9 @@ MonoBehaviour: m_NumColorKeys: 2 m_NumAlphaKeys: 2 outlineGradientInLocalSpace: 0 - outlineWidth: 0.45 + outlineWidth: 0.2 outlineBlurPasses: 2 - outlineQuality: 3 + outlineQuality: 2 outlineEdgeMode: 0 outlineEdgeThreshold: 0.995 outlineSharpness: 1 diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs index 4248d0aa1..31b36cdb7 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs @@ -96,7 +96,7 @@ public bool TryTeleportToPosition(Vector3 position) public bool HasReachedDestination() { - return _iAstarAi.pathPending == false && _iAstarAi.reachedEndOfPath; + return _iAstarAi.pathPending == false && _iAstarAi.reachedDestination; } public bool IsPositionMovable(Vector3 endPosition) diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/Cosmetic/InteractableHighlight.cs b/Assets/_DDD/_Scripts/Restaurant/Event/Cosmetic/InteractableHighlight.cs index 8ff387554..f2d0eeb04 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/Cosmetic/InteractableHighlight.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/Cosmetic/InteractableHighlight.cs @@ -95,11 +95,16 @@ public void RegisterHighlightProxy(GameObject highlightProxyObject) { var highlightProxy = highlightProxyObject.GetComponent(); _highlightProxy = highlightProxy; + _highlightProxy.enabled = true; ApplyHighlightSettings(highlightProxy); } public void ClearHighlightProxy() { + if (_highlightProxy) + { + _highlightProxy.enabled = false; + } _highlightProxy = null; } From 92f24af250c84b97a833d81e09cfe21d7413bc59 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 15:03:53 +0900 Subject: [PATCH 02/13] =?UTF-8?q?Prop=20World=20Ui=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 130 ++---------------- .../Component/PropUiDisplayComponent.cs | 22 ++- .../Component/RestaurantUiDisplayComponent.cs | 16 +-- 3 files changed, 35 insertions(+), 133 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 09b034e02..84946ab73 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -9,7 +9,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1664322405549350652} - - component: {fileID: 8522104897182006738} m_Layer: 0 m_Name: InteractionPoint m_TagString: Untagged @@ -32,61 +31,6 @@ Transform: m_Children: [] m_Father: {fileID: 3697702677815423220} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &8522104897182006738 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3857692527302447930} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - 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: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: c607300554a0c44469620484fccbf239, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 5.12, y: 5.12} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 --- !u!1 &4103096974375017811 GameObject: m_ObjectHideFlags: 0 @@ -102,7 +46,6 @@ GameObject: - component: {fileID: 29040892075516248} - component: {fileID: 1332098886975329103} - component: {fileID: 3786917981383564029} - - component: {fileID: 1886819858489010523} m_Layer: 7 m_Name: RestaurantOrder m_TagString: Untagged @@ -223,7 +166,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 1 + Data: 2 - Name: Entry: 7 Data: @@ -236,6 +179,18 @@ MonoBehaviour: - Name: Entry: 8 Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 4 + - Name: $v + Entry: 10 + Data: 0 + - Name: + Entry: 8 + Data: - Name: Entry: 13 Data: @@ -269,7 +224,7 @@ MonoBehaviour: _unavailableStyle: Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} Width: 0.5 - Opacity: 0.5 + Opacity: 1 _objectiveStyle: Color: {r: 0, g: 1, b: 1, a: 1} Width: 0.5 @@ -480,64 +435,9 @@ MonoBehaviour: seeThroughTextureUVSpace: 0 seeThroughTextureScale: 1 seeThroughChildrenSortingMode: 0 - rmsCount: 2 + rmsCount: 0 hitFxInitialIntensity: 0 hitFxMode: 0 hitFxFadeOutDuration: 0.25 hitFxColor: {r: 1, g: 1, b: 1, a: 1} hitFxRadius: 0.5 ---- !u!212 &1886819858489010523 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4103096974375017811} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - 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: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: c607300554a0c44469620484fccbf239, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 5.12, y: 5.12} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index 20651703d..e7ade474d 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -7,10 +7,10 @@ namespace DDD.Restaurant { public abstract class PropUiDisplayComponent : SerializedMonoBehaviour where T : Enum { - [SerializeField] - protected Vector3 _offset = new Vector3(0.0f, 0.75f, 0.675f); [SerializeField] protected Vector3 _rotation = new Vector3(40.0f, 0, 0); + [SerializeField] + protected Sprite _defaultSprite; private IInteractionSubsystemObject _interactionSubsystemObject; private Dictionary _materialDictionary; private T _currentInteractionType; @@ -35,16 +35,19 @@ protected virtual void Initialize() // TODO: 임시 나중에 제대로 수정할 것 var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform); + + _spriteRenderer = uiGameObject.AddComponent(); + _spriteRenderer.sprite = GetDisplaySprite(); + _spriteRenderer.enabled = false; + _spriteTransform = uiGameObject.transform; uiGameObject.layer = LayerMask.NameToLayer("WorldUI"); UpdateSpriteTransform(); - - _spriteRenderer = uiGameObject.AddComponent(); - _spriteRenderer.enabled = false; + _materialDictionary = SetMaterialDictionary(); } - private void UpdateSpriteTransform() + protected virtual void UpdateSpriteTransform() { _spriteTransform.position = GetDisplayPosition(); _spriteTransform.rotation = Quaternion.Euler(GetDisplayRotation()); @@ -57,9 +60,14 @@ private bool GetOwnerInteractable(out IInteractable interactable) return isInteractionSubsystem; } + protected virtual Sprite GetDisplaySprite() + { + return _defaultSprite; + } + protected virtual Vector3 GetDisplayPosition() { - return transform.position + _offset; + return transform.position; } protected virtual Vector3 GetDisplayRotation() diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index cebc84afe..2edef1651 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -9,7 +9,7 @@ namespace DDD.Restaurant public class RestaurantUiDisplayComponent : PropUiDisplayComponent { [SerializeField] - private Sprite _temporarySprite; + protected Vector3 _offset = new Vector3(0.0f, 0.75f, 0.675f); [SerializeField] private Vector2 _fixedSpriteSize = new Vector2(.2f, .2f); [OdinSerialize] @@ -19,10 +19,9 @@ protected override Dictionary SetMaterialDictiona return _materialDictionary; } - protected override void Initialize() + protected override void UpdateSpriteTransform() { - base.Initialize(); - _spriteRenderer.sprite = _temporarySprite; + base.UpdateSpriteTransform(); _spriteRenderer.transform.localScale = _fixedSpriteSize; } @@ -31,18 +30,13 @@ protected override Vector3 GetDisplayPosition() if (GetCurrentInteractionType() == RestaurantOrderType.Order) { // Find interaction points from interactable owner - if (_interactable == null) - { - return base.GetDisplayPosition(); - } - - var points = _interactable.GetInteractionPoints(); + var points = _interactable?.GetInteractionPoints(); if (points is { Length: > 0 }) { return points[0] + _offset; } } - return base.GetDisplayPosition(); + return transform.position; } } } \ No newline at end of file From e100edc360ec0837143e191fb5a398a4694fc42d Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 15:16:01 +0900 Subject: [PATCH 03/13] =?UTF-8?q?RestaurantOrder-Serve=20=EC=8A=A4?= =?UTF-8?q?=ED=94=84=EB=9D=BC=EC=9D=B4=ED=8A=B8=20=EB=A0=8C=EB=8D=94=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 4 +-- .../Component/PropUiDisplayComponent.cs | 12 +++++-- .../Component/RestaurantUiDisplayComponent.cs | 31 ++++++++++++++++--- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 84946ab73..003272451 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -197,9 +197,9 @@ MonoBehaviour: - Name: Entry: 8 Data: - _offset: {x: 0, y: 1.5, z: 1.35} _rotation: {x: 40, y: 0, z: 0} - _temporarySprite: {fileID: 21300000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} + _defaultSprite: {fileID: 21300000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} + _offset: {x: 0, y: 1.5, z: 1.35} _fixedSpriteSize: {x: 0.2, y: 0.2} --- !u!114 &1332098886975329103 MonoBehaviour: diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index e7ade474d..707183dcc 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -95,25 +95,31 @@ public void SetCurrentInteractionType(T interactionType) private void UpdateView(T state) { - if (UpdateSpriteMaterial(state)) + if (!UpdateSpriteMaterial(state)) { return; } UpdateSpriteTransform(); } + virtual protected Color GetSpriteColor() + { + return Color.white; + } + private bool UpdateSpriteMaterial(T state) { if (!_materialDictionary.TryGetValue(state, out var material) || material == null) { // TODO 캔버스 다운 _spriteRenderer.enabled = false; - return true; + return false; } + material.color = GetSpriteColor(); // ui 머티리얼 교체 _spriteRenderer.enabled = true; _spriteRenderer.material = material; - return false; + return true; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 2edef1651..9829eb4d6 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -2,6 +2,7 @@ using UnityEngine; using Sirenix.OdinInspector; using Sirenix.Serialization; +using UnityEngine.Serialization; namespace DDD.Restaurant @@ -11,8 +12,12 @@ public class RestaurantUiDisplayComponent : PropUiDisplayComponent _materialDictionary = new(); protected override Dictionary SetMaterialDictionary() { @@ -22,7 +27,25 @@ protected override Dictionary SetMaterialDictiona protected override void UpdateSpriteTransform() { base.UpdateSpriteTransform(); - _spriteRenderer.transform.localScale = _fixedSpriteSize; + _spriteRenderer.transform.localScale = _fixedLocalScale; + } + + protected override Sprite GetDisplaySprite() + { + if (GetCurrentInteractionType() == RestaurantOrderType.Serve) + { + // TODO : Sprite by current restaurant order type. get from RestaurantOrderObject. + } + return base.GetDisplaySprite(); + } + + protected override Color GetSpriteColor() + { + if (GetCurrentInteractionType() == RestaurantOrderType.Serve) + { + return _disabledColor; + } + return base.GetSpriteColor(); } protected override Vector3 GetDisplayPosition() @@ -36,7 +59,7 @@ protected override Vector3 GetDisplayPosition() return points[0] + _offset; } } - return transform.position; + return transform.position + _disabledOffset; } } } \ No newline at end of file From 86518fcd84d051772c8fdf0793e91c30b23c5aa3 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 15:25:06 +0900 Subject: [PATCH 04/13] =?UTF-8?q?WorldUiDisplay=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=9C=20=EC=A7=81=EB=A0=AC=ED=99=94=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 9829eb4d6..9bf89c93f 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -17,7 +17,7 @@ public class RestaurantUiDisplayComponent : PropUiDisplayComponent _materialDictionary = new(); protected override Dictionary SetMaterialDictionary() { From 32d2e31b50b1b6f667901fdc142e857e8dbcaaa9 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 15:36:49 +0900 Subject: [PATCH 05/13] =?UTF-8?q?PropUiDisplay=20=EC=A7=81=EB=A0=AC?= =?UTF-8?q?=ED=99=94=20=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interactables/Common/RestaurantOrder.prefab | 8 +++++--- .../Ui/OrderUi/Component/PropUiDisplayComponent.cs | 8 ++++---- .../Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs | 7 ++++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 003272451..249c94e7f 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -172,7 +172,7 @@ MonoBehaviour: Data: - Name: $k Entry: 3 - Data: 2 + Data: 4 - Name: $v Entry: 10 Data: 0 @@ -184,7 +184,7 @@ MonoBehaviour: Data: - Name: $k Entry: 3 - Data: 4 + Data: 2 - Name: $v Entry: 10 Data: 0 @@ -200,7 +200,9 @@ MonoBehaviour: _rotation: {x: 40, y: 0, z: 0} _defaultSprite: {fileID: 21300000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} _offset: {x: 0, y: 1.5, z: 1.35} - _fixedSpriteSize: {x: 0.2, y: 0.2} + _disabledOffset: {x: 0, y: 0.2, z: 0.165} + _fixedLocalScale: {x: 0.2, y: 0.2} + _disabledColor: {r: 0.6627451, g: 0.6627451, b: 0.6627451, a: 0.5} --- !u!114 &1332098886975329103 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index 707183dcc..160b71c9b 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -12,7 +12,7 @@ public abstract class PropUiDisplayComponent : SerializedMonoBehaviour where [SerializeField] protected Sprite _defaultSprite; private IInteractionSubsystemObject _interactionSubsystemObject; - private Dictionary _materialDictionary; + private Dictionary _internalMaterials; private T _currentInteractionType; protected IInteractable _interactable; protected SpriteRenderer _spriteRenderer; @@ -22,7 +22,7 @@ private void Awake() Initialize(); } - protected abstract Dictionary SetMaterialDictionary(); + protected abstract Dictionary GetInteractionDisplayMaterials(); protected virtual void Initialize() { @@ -44,7 +44,7 @@ protected virtual void Initialize() uiGameObject.layer = LayerMask.NameToLayer("WorldUI"); UpdateSpriteTransform(); - _materialDictionary = SetMaterialDictionary(); + _internalMaterials = GetInteractionDisplayMaterials(); } protected virtual void UpdateSpriteTransform() @@ -109,7 +109,7 @@ virtual protected Color GetSpriteColor() private bool UpdateSpriteMaterial(T state) { - if (!_materialDictionary.TryGetValue(state, out var material) || material == null) + if (!_internalMaterials.TryGetValue(state, out var material) || material == null) { // TODO 캔버스 다운 _spriteRenderer.enabled = false; diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 9bf89c93f..636f936ea 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -19,11 +19,16 @@ public class RestaurantUiDisplayComponent : PropUiDisplayComponent _materialDictionary = new(); - protected override Dictionary SetMaterialDictionary() + protected override Dictionary GetInteractionDisplayMaterials() { return _materialDictionary; } + protected override void Initialize() + { + base.Initialize(); + } + protected override void UpdateSpriteTransform() { base.UpdateSpriteTransform(); From 529da3b713d360f3881a43a7bbd2ab5cd795c7b2 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 16:26:38 +0900 Subject: [PATCH 06/13] =?UTF-8?q?RestaurantOrder=20Serve=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EC=9D=BC=20=EB=95=8C=20=EC=9D=8C=EC=8B=9D=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 7 +- .../SpatialUi_SpriteBubble_Translucent.mat | 368 ++++++++++++++++++ ...patialUi_SpriteBubble_Translucent.mat.meta | 8 + .../Restaurant/Order/bubble.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_001.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_002.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_003.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_004.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_005.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_006.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_007.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_008.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_009.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_011.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_012.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_013.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_014.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_016.png.meta | 2 +- .../Sprites/Ui/Foods/item_food_017.png.meta | 2 +- .../AssetPostprocessorSprite.cs | 2 +- .../InteractionSubsystem_Order.cs | 1 + .../RestaurantOrderSolver_Order.cs | 30 +- .../FlowStates/RestaurantManagementState.cs | 4 +- .../_Scripts/Restaurant/Ui/Hud/BillHud.cs | 7 +- .../Component/PropUiDisplayComponent.cs | 13 +- .../Component/RestaurantUiDisplayComponent.cs | 11 +- 26 files changed, 437 insertions(+), 46 deletions(-) create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat create mode 100644 Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat.meta diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 249c94e7f..5d6eeb540 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -141,6 +141,7 @@ MonoBehaviour: SerializedFormat: 2 SerializedBytes: ReferencedUnityObjects: + - {fileID: 2100000, guid: 3420d0083698c4732af621bf37a11cbb, type: 2} - {fileID: 2100000, guid: cecea4c48dc174e34973ec5b33b2b2a9, type: 2} SerializedBytesString: Prefab: {fileID: 0} @@ -187,7 +188,7 @@ MonoBehaviour: Data: 2 - Name: $v Entry: 10 - Data: 0 + Data: 1 - Name: Entry: 8 Data: @@ -201,8 +202,8 @@ MonoBehaviour: _defaultSprite: {fileID: 21300000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} _offset: {x: 0, y: 1.5, z: 1.35} _disabledOffset: {x: 0, y: 0.2, z: 0.165} - _fixedLocalScale: {x: 0.2, y: 0.2} - _disabledColor: {r: 0.6627451, g: 0.6627451, b: 0.6627451, a: 0.5} + _fixedLocalScale: {x: 0.3, y: 0.3} + _disabledColor: {r: 0.6627451, g: 0.6627451, b: 0.6627451, a: 0.65882355} --- !u!114 &1332098886975329103 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat new file mode 100644 index 000000000..50dd16ed1 --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat @@ -0,0 +1,368 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SpatialUi_SpriteBubble_Translucent + m_Shader: {fileID: 4800000, guid: 13c02b14c4d048fa9653293d54f6e0e1, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BackgroundTexture: + m_Texture: {fileID: 2800000, guid: f88e7478e74a14cb6a820978eb9f452f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorRampTex: + m_Texture: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorRampTexGradient: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ColorSwapTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeBurnTex: + m_Texture: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlowTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 94f9e78fc7b864b93842bdfa21276f09, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineDistortTex: + m_Texture: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OutlineTex: + m_Texture: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OverlayTex: + m_Texture: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ShineMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpriteTexture: + m_Texture: {fileID: 2800000, guid: 7394cfdc5ad4642058b80a859c8a7319, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _AddPrecomputedVelocity: 0 + - _Alpha: 1 + - _AlphaClip: 0 + - _AlphaCutoffValue: 0.25 + - _AlphaOutlineBlend: 1 + - _AlphaOutlineGlow: 5 + - _AlphaOutlineMinAlpha: 0 + - _AlphaOutlinePower: 1 + - _AlphaRoundThreshold: 0.5 + - _AlphaToMask: 0 + - _BillboardY: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BlurHD: 0 + - _BlurIntensity: 10 + - _Brightness: 0 + - _BumpScale: 1 + - _ChromAberrAlpha: 0.4 + - _ChromAberrAmount: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _ClipUvDown: 0 + - _ClipUvLeft: 0 + - _ClipUvRight: 0 + - _ClipUvUp: 0 + - _ColorChangeLuminosity: 0 + - _ColorChangeTolerance: 0.25 + - _ColorChangeTolerance2: 0.25 + - _ColorChangeTolerance3: 0.25 + - _ColorMask: 15 + - _ColorRampBlend: 1 + - _ColorRampLuminosity: 0 + - _ColorRampOutline: 0 + - _ColorSwapBlend: 1 + - _ColorSwapBlueLuminosity: 0.5 + - _ColorSwapGreenLuminosity: 0.5 + - _ColorSwapRedLuminosity: 0.5 + - _Contrast: 1 + - _Cull: 2 + - _CullingOption: 0 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DistortAmount: 0.5 + - _DistortTexXSpeed: 5 + - _DistortTexYSpeed: 5 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EditorDrawers: 6 + - _EnableExternalAlpha: 0 + - _EnvironmentReflections: 1 + - _FadeAmount: -0.1 + - _FadeBurnGlow: 2 + - _FadeBurnTransition: 0.075 + - _FadeBurnWidth: 0.025 + - _FishEyeUvAmount: 0.35 + - _FlickerAlpha: 0 + - _FlickerFreq: 0.2 + - _FlickerPercent: 0.05 + - _GhostBlend: 1 + - _GhostColorBoost: 1 + - _GhostTransparency: 0 + - _GlitchAmount: 3 + - _GlitchSize: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Glow: 10 + - _GlowGlobal: 1 + - _GradBlend: 1 + - _GradBoostX: 1.2 + - _GradBoostY: 1.2 + - _GradIsRadial: 0 + - _GrassManualAnim: 1 + - _GrassManualToggle: 0 + - _GrassRadialBend: 0.1 + - _GrassSpeed: 2 + - _GrassWind: 20 + - _GreyscaleBlend: 1 + - _GreyscaleLuminosity: 0 + - _GreyscaleOutline: 0 + - _HandDrawnAmount: 10 + - _HandDrawnSpeed: 5 + - _HitEffectBlend: 1 + - _HitEffectGlow: 5 + - _HologramBlend: 1 + - _HologramMaxAlpha: 0.75 + - _HologramMinAlpha: 0.1 + - _HologramStripesAmount: 0.1 + - _HologramStripesSpeed: 4.5 + - _HologramUnmodAmount: 0 + - _HsvBright: 1 + - _HsvSaturation: 1 + - _HsvShift: 180 + - _InnerOutlineAlpha: 1 + - _InnerOutlineGlow: 4 + - _InnerOutlineThickness: 1 + - _MaxXUV: 1 + - _MaxYUV: 1 + - _Metallic: 0 + - _MinXUV: 0 + - _MinYUV: 0 + - _MotionBlurAngle: 0.1 + - _MotionBlurDist: 1.25 + - _MyDstMode: 10 + - _MySrcMode: 5 + - _NegativeAmount: 1 + - _OcclusionStrength: 1 + - _OffsetUvX: 0 + - _OffsetUvY: 0 + - _OnlyInnerOutline: 0 + - _OnlyOutline: 0 + - _OutlineAlpha: 1 + - _OutlineDistortAmount: 0.5 + - _OutlineDistortTexXSpeed: 5 + - _OutlineDistortTexYSpeed: 5 + - _OutlineGlow: 1.5 + - _OutlinePixelWidth: 1 + - _OutlineTexXSpeed: 10 + - _OutlineTexYSpeed: 0 + - _OutlineWidth: 0.004 + - _OverlayBlend: 1 + - _OverlayGlow: 1 + - _OverlayTextureScrollXSpeed: 0.25 + - _OverlayTextureScrollYSpeed: 0.25 + - _Parallax: 0.005 + - _PinchUvAmount: 0.35 + - _PixelateSize: 32 + - _PosterizeGamma: 0.75 + - _PosterizeNumColors: 8 + - _PosterizeOutline: 0 + - _QueueOffset: 0 + - _RadialClip: 45 + - _RadialClip2: 0 + - _RadialStartAngle: 90 + - _RandomSeed: 0 + - _ReceiveShadows: 1 + - _RectSize: 1 + - _RotateUvAmount: 0 + - _RoundWaveSpeed: 2 + - _RoundWaveStrength: 0.7 + - _ShadowAlpha: 0.5 + - _ShadowX: 0.1 + - _ShadowY: -0.05 + - _ShakeUvSpeed: 2.5 + - _ShakeUvX: 1.5 + - _ShakeUvY: 1 + - _ShineGlow: 1 + - _ShineLocation: 0.5 + - _ShineRotate: 0 + - _ShineWidth: 0.1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 + - _Surface: 0 + - _TextureScrollXSpeed: 1 + - _TextureScrollYSpeed: 0 + - _TwistUvAmount: 1 + - _TwistUvPosX: 0.5 + - _TwistUvPosY: 0.5 + - _TwistUvRadius: 0.75 + - _WarpScale: 0.5 + - _WarpSpeed: 8 + - _WarpStrength: 0.025 + - _WaveAmount: 7 + - _WaveSpeed: 10 + - _WaveStrength: 7.5 + - _WaveX: 0 + - _WaveY: 0.5 + - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 + - _ZTestMode: 4 + - _ZWrite: 1 + - _ZoomUvAmount: 0.5 + m_Colors: + - _AlphaOutlineColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _ColorChangeNewCol: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeNewCol2: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeNewCol3: {r: 1, g: 1, b: 0, a: 1} + - _ColorChangeTarget: {r: 1, g: 0, b: 0, a: 1} + - _ColorChangeTarget2: {r: 1, g: 0, b: 0, a: 1} + - _ColorChangeTarget3: {r: 1, g: 0, b: 0, a: 1} + - _ColorSwapBlue: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapGreen: {r: 1, g: 1, b: 1, a: 1} + - _ColorSwapRed: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _FadeBurnColor: {r: 1, g: 1, b: 0, a: 1} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _GlowColor: {r: 1, g: 1, b: 1, a: 1} + - _GradBotLeftCol: {r: 0, g: 0, b: 1, a: 1} + - _GradBotRightCol: {r: 0, g: 1, b: 0, a: 1} + - _GradTopLeftCol: {r: 1, g: 0, b: 0, a: 1} + - _GradTopRightCol: {r: 1, g: 1, b: 0, a: 1} + - _GreyscaleTintColor: {r: 1, g: 1, b: 1, a: 1} + - _HitEffectColor: {r: 1, g: 1, b: 1, a: 1} + - _HologramStripeColor: {r: 0, g: 1, b: 1, a: 1} + - _InnerOutlineColor: {r: 1, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 1, g: 1, b: 1, a: 1} + - _OverlayColor: {r: 1, g: 1, b: 1, a: 1} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + - _ShadowColor: {r: 0, g: 0, b: 0, a: 1} + - _ShineColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &5575994803489782819 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat.meta b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat.meta new file mode 100644 index 000000000..a108a15bf --- /dev/null +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/SpatialUi_SpriteBubble_Translucent.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3420d0083698c4732af621bf37a11cbb +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta index e7bbcd418..e894fda4c 100644 --- a/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta +++ b/Assets/_DDD/_Addressables/Materials/Restaurant/Order/bubble.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 + spritePixelsToUnits: 256 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_001.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_001.png.meta index 2eabb919e..45b64fb25 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_001.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_001.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.1015625} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_002.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_002.png.meta index b37a91067..5fb19ef35 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_002.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_002.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.068359375} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_003.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_003.png.meta index 5b55594b8..3eca2bd92 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_003.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_003.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.1171875} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_004.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_004.png.meta index 273cf4528..a1cb4843e 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_004.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_004.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.109375} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_005.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_005.png.meta index 4f78ce2d4..fedd58bc1 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_005.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_005.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_006.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_006.png.meta index ebcff3d75..19361ae16 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_006.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_006.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.12890625} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_007.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_007.png.meta index e37484d19..d715b878a 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_007.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_007.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.083984375} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_008.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_008.png.meta index 56db3be97..042ebe20a 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_008.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_008.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.091796875} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_009.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_009.png.meta index 5d242638b..553b66a64 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_009.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_009.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.021484375} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_011.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_011.png.meta index 02d9115e3..00d6df70c 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_011.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_011.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.05859375} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_012.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_012.png.meta index 2990a9715..da0ee65b5 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_012.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_012.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.044921875} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_013.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_013.png.meta index 2f2224869..e756b3c78 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_013.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_013.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.0703125} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_014.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_014.png.meta index 19c8f5f99..92741e954 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_014.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_014.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.05078125} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_016.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_016.png.meta index 602d157b4..72719b525 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_016.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_016.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_017.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_017.png.meta index 1833eb119..0c5e4151e 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_017.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Foods/item_food_017.png.meta @@ -48,7 +48,7 @@ TextureImporter: spriteMeshType: 0 alignment: 0 spritePivot: {x: 0.5, y: 0.03515625} - spritePixelsToUnits: 100 + spritePixelsToUnits: 512 spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 diff --git a/Assets/_DDD/_Scripts/AssetPostprocessors/AssetPostprocessorSprite.cs b/Assets/_DDD/_Scripts/AssetPostprocessors/AssetPostprocessorSprite.cs index 1c4c17d5e..281a6e9e7 100644 --- a/Assets/_DDD/_Scripts/AssetPostprocessors/AssetPostprocessorSprite.cs +++ b/Assets/_DDD/_Scripts/AssetPostprocessors/AssetPostprocessorSprite.cs @@ -47,7 +47,7 @@ public static void OnPreprocessTextureForUi(TextureImporter importer) importer.spriteImportMode = SpriteImportMode.Single; // 기본 PPU (UI는 100 또는 1 고정 추천) - importer.spritePixelsPerUnit = 100f; + // importer.spritePixelsPerUnit = 100f; importer.sRGBTexture = true; importer.isReadable = false; diff --git a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs index 6b8a4ad8d..5384e5cb6 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs @@ -19,6 +19,7 @@ public class RestaurantOrderObjectState public GameObject Customer; public GameObject Worker; + public string RecipeId; public string FoodId; } diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs index f8a3d2b0c..a03a0bbff 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs @@ -15,7 +15,7 @@ public string MenuId public class RestaurantOrderEvent : IEvent { - public string RecipeId; + public RestaurantOrderObjectState OrderObjectState; } public class RestaurantOrderSolver_Order : RestaurantOrderSolverBase @@ -27,30 +27,34 @@ public override bool ExecuteInteractionSubsystem(IInteractor interactor, IIntera var highlightComponent = highlightObject?.GetComponent(); highlightComponent?.ClearHighlightProxy(); - // Worker takes the order - var orderObject = GetRestaurantOrderObject(interactable); - if (orderObject != null) - { - orderObject.GetOrderObjectState().Worker = interactor.GetInteractorGameObject(); - } - // Pick random menu from today's menu list - var foodCandidates = RestaurantState.Instance.ManagementState.GetTodayFoodMenus(); - if (foodCandidates == null || foodCandidates.Count == 0) + var recipeCandidates = RestaurantState.Instance.ManagementState.GetTodayRecipes(); + if (recipeCandidates == null || recipeCandidates.Count == 0) { Debug.LogError("[RestaurantOrderSolver_Order] No food menu found"); return false; } // TODO : 손님 데이터를 바탕으로 선호하는 음식을 골라야 할수도 있음. interactable에서 직접 가져오거나 payload로 전달받아야 함. payload를 받을 경우 RestaurantOrderMenuPayload와 통합해야함 - var foodMenu = foodCandidates[Random.Range(0, foodCandidates.Count)]; + var recipeMenu = recipeCandidates[Random.Range(0, recipeCandidates.Count)]; + + // Worker takes the order + var orderObject = GetRestaurantOrderObject(interactable); + if (orderObject != null) + { + orderObject.GetOrderObjectState().Worker = interactor.GetInteractorGameObject(); + orderObject.GetOrderObjectState().RecipeId = recipeMenu; + var recipeData = DataManager.Instance.GetDataAsset(); + recipeData.TryGetDataById(recipeMenu, out var recipeDataEntry); + orderObject.GetOrderObjectState().FoodId = recipeDataEntry?.RecipeResult; + } // Create payload and set the menu RestaurantOrderMenuPayload orderPayload = ScriptableObject.CreateInstance(); - orderPayload.MenuId = foodMenu; + orderPayload.MenuId = recipeMenu; RestaurantOrderEvent evt = new RestaurantOrderEvent(); - evt.RecipeId = foodMenu; + evt.OrderObjectState = orderObject?.GetOrderObjectState(); EventBus.Broadcast(evt); return base.ExecuteInteractionSubsystem(interactor, interactable, payload); diff --git a/Assets/_DDD/_Scripts/Restaurant/State/FlowStates/RestaurantManagementState.cs b/Assets/_DDD/_Scripts/Restaurant/State/FlowStates/RestaurantManagementState.cs index d74454884..312475a3a 100644 --- a/Assets/_DDD/_Scripts/Restaurant/State/FlowStates/RestaurantManagementState.cs +++ b/Assets/_DDD/_Scripts/Restaurant/State/FlowStates/RestaurantManagementState.cs @@ -63,12 +63,12 @@ public bool HasMatchedMenuWithCookware() return _cookwareToRecipeMapping.Values.Any(recipeSet => recipeSet.Count > 0); } - public List GetTodayFoodMenus() + public List GetTodayRecipes() { return _todayFoodRecipeAndAmounts.Keys.ToList(); } - public int GetTodayFoodAvailableCount(string recipeId) + public int GetTodayRecipeAvailableCount(string recipeId) { return _todayFoodRecipeAndAmounts.GetValueOrDefault(recipeId, 0); } diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs index 21daed8ab..4624d793c 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs @@ -19,12 +19,7 @@ private void Start() public void HandleEvent(RestaurantOrderEvent evt) { var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform); - var recipeData = DataManager.Instance.GetDataAsset(); - if (recipeData.TryGetDataById(evt.RecipeId, out var recipeDataEntry)) - { - var sprite = DataManager.Instance.GetSprite(recipeDataEntry.RecipeResult); - billItem.GetComponent().sprite = sprite; - } + var sprite = DataManager.Instance.GetSprite(evt.OrderObjectState?.FoodId); } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index 160b71c9b..a74b4ba3f 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -11,7 +11,7 @@ public abstract class PropUiDisplayComponent : SerializedMonoBehaviour where protected Vector3 _rotation = new Vector3(40.0f, 0, 0); [SerializeField] protected Sprite _defaultSprite; - private IInteractionSubsystemObject _interactionSubsystemObject; + protected IInteractionSubsystemObject _interactionSubsystemObject; private Dictionary _internalMaterials; private T _currentInteractionType; protected IInteractable _interactable; @@ -37,7 +37,7 @@ protected virtual void Initialize() var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform); _spriteRenderer = uiGameObject.AddComponent(); - _spriteRenderer.sprite = GetDisplaySprite(); + UpdateSprite(); _spriteRenderer.enabled = false; _spriteTransform = uiGameObject.transform; @@ -47,6 +47,11 @@ protected virtual void Initialize() _internalMaterials = GetInteractionDisplayMaterials(); } + private void UpdateSprite() + { + _spriteRenderer.sprite = GetDisplaySprite(); + } + protected virtual void UpdateSpriteTransform() { _spriteTransform.position = GetDisplayPosition(); @@ -99,6 +104,7 @@ private void UpdateView(T state) { return; } + UpdateSprite(); UpdateSpriteTransform(); } @@ -115,7 +121,8 @@ private bool UpdateSpriteMaterial(T state) _spriteRenderer.enabled = false; return false; } - material.color = GetSpriteColor(); + // material.color = Color.white; + _spriteRenderer.color = GetSpriteColor(); // ui 머티리얼 교체 _spriteRenderer.enabled = true; _spriteRenderer.material = material; diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index 636f936ea..f958f894c 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -37,9 +37,16 @@ protected override void UpdateSpriteTransform() protected override Sprite GetDisplaySprite() { - if (GetCurrentInteractionType() == RestaurantOrderType.Serve) + if (GetCurrentInteractionType() == RestaurantOrderType.Serve && _interactionSubsystemObject != null) { - // TODO : Sprite by current restaurant order type. get from RestaurantOrderObject. + // Sprite by current restaurant order type. get from RestaurantOrderObject. + if (_interactionSubsystemObject is IRestaurantOrderObject orderObject) + { + string foodId = orderObject.GetOrderObjectState().FoodId; + Debug.Assert(foodId != null, nameof(foodId) + " != null"); + var sprite = DataManager.Instance.GetSprite(foodId); + return sprite; + } } return base.GetDisplaySprite(); } From 2edec060c5c2a9a8e402899755115f93420f59ad Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 16:33:43 +0900 Subject: [PATCH 07/13] =?UTF-8?q?PropUiDisplay=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ui/OrderUi/Component/PropUiDisplayComponent.cs | 9 ++++++++- .../Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index a74b4ba3f..a8d034ae6 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -41,7 +41,7 @@ protected virtual void Initialize() _spriteRenderer.enabled = false; _spriteTransform = uiGameObject.transform; - uiGameObject.layer = LayerMask.NameToLayer("WorldUI"); + uiGameObject.layer = GetDisplayLayer(); UpdateSpriteTransform(); _internalMaterials = GetInteractionDisplayMaterials(); @@ -65,6 +65,11 @@ private bool GetOwnerInteractable(out IInteractable interactable) return isInteractionSubsystem; } + protected virtual int GetDisplayLayer() + { + return LayerMask.NameToLayer("WorldUI"); + } + protected virtual Sprite GetDisplaySprite() { return _defaultSprite; @@ -126,6 +131,8 @@ private bool UpdateSpriteMaterial(T state) // ui 머티리얼 교체 _spriteRenderer.enabled = true; _spriteRenderer.material = material; + _spriteTransform.gameObject.layer = GetDisplayLayer(); + return true; } } diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index f958f894c..aa8d0454e 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -73,5 +73,14 @@ protected override Vector3 GetDisplayPosition() } return transform.position + _disabledOffset; } + + protected override int GetDisplayLayer() + { + if (GetCurrentInteractionType() == RestaurantOrderType.Serve) + { + return LayerMask.NameToLayer("Prop"); + } + return base.GetDisplayLayer(); + } } } \ No newline at end of file From 3f237cd1c1f1c0e314e9f64d4999f4b9e7d71f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Mon, 1 Sep 2025 16:33:52 +0900 Subject: [PATCH 08/13] =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EC=82=AC=ED=95=AD:?= =?UTF-8?q?=20RestaurantEnvironmentPointQueryEvent=20=EC=82=AD=EC=A0=9C,?= =?UTF-8?q?=20CheckCumulateOrderCount=20=EC=A1=B0=EA=B1=B4=20=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80,=20CustomerBlackboardSo=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=B6=94=EA=B0=80,=20ExitSubtree?= =?UTF-8?q?=20=EC=97=90=EC=85=8B=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Subtree/CustomerDefault.asset | 4 +- .../AI/Customer/Subtree/ExitSubtree.asset | 3 ++ .../Customer/Subtree/ExitSubtree.asset.meta | 8 +++ .../AI/Customer/Subtree/OrderSubtree.asset | 4 +- .../_Scripts/AI/Common/IAISharedBlackboard.cs | 7 +-- .../AI/Common/Actions/ExpressEmotion.cs | 10 ++-- .../Common/Actions/LookAtInteractionTarget.cs | 15 +++--- .../AI/Common/Actions/MoveToTargetPoint.cs | 15 +++--- .../Actions/RestaurantExpressEmotion.cs | 7 +++ .../Actions/RestaurantExpressEmotion.cs.meta | 3 ++ .../RestaurantLookAtInteractionTarget.cs | 12 +++++ .../RestaurantLookAtInteractionTarget.cs.meta | 3 ++ .../Actions/RestaurantMoveToTargetPoint.cs | 12 +++++ .../RestaurantMoveToTargetPoint.cs.meta | 3 ++ .../RestaurantSearchAndRegisterMarker.cs | 7 +++ .../RestaurantSearchAndRegisterMarker.cs.meta | 3 ++ .../Common/Actions/SearchAndRegisterMarker.cs | 12 ++--- .../Character/AI/Common/BlackboardSO.cs | 4 ++ .../AI/Common/Decorator/TimeLimiter.cs | 4 +- .../Customer/Actions/IncrementOrderCount.cs | 20 +++++++ .../Actions/IncrementOrderCount.cs.meta | 3 ++ .../AI/Customer/Actions/LeaveRestaurant.cs | 15 ++++++ .../Customer/Actions/LeaveRestaurant.cs.meta | 3 ++ .../PublishRestaurantInterruptEvent.cs | 33 ++++++++++++ .../PublishRestaurantInterruptEvent.cs.meta | 3 ++ .../Customer/Actions/SatisfactionEvaluator.cs | 6 +-- .../Customer/Actions/StartRestaurantOrder.cs | 12 ++--- .../Actions/WaitForPlayerInteraction.cs | 4 +- .../Conditionals/CheckCumulateOrderCount.cs | 54 +++++++++++++++++++ .../CheckCumulateOrderCount.cs.meta | 3 ++ .../Customer/CustomerBlackboardComponent.cs | 48 ++++++++++++++--- .../AI/Customer/CustomerBlackboardSo.cs | 12 +++++ .../AI/Customer/CustomerBlackboardSo.cs.meta | 3 ++ .../Customer/Decorator/CustomerTimeLimiter.cs | 4 +- .../Interfaces/ICustomerBlackboard.cs | 7 ++- .../Restaurant/Character/Npc/NpcMovement.cs | 1 + .../InteractionSubsystem_Order.cs | 27 +++++++++- .../RestaurantEnvironmentPointQueryEvent.cs | 15 ------ ...staurantEnvironmentPointQueryEvent.cs.meta | 3 -- .../Event/RestaurantInteractionEvents.cs | 32 ++++------- 40 files changed, 350 insertions(+), 94 deletions(-) create mode 100644 Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset create mode 100644 Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs.meta create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs.meta delete mode 100644 Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs delete mode 100644 Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs.meta diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index 7529b61c5..40e84f88d 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8089b1a0f359704e721ce008d9816bc58743c7a00abdf7cc504619f18500877f -size 67585 +oid sha256:2fe64a49fbb21f1fbd05ddebda355334a5aef73bf06397fad07f7d5d204cc0d9 +size 67467 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset new file mode 100644 index 000000000..7db36239c --- /dev/null +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e351f1463cecafcddf5c1b9d015cbacf88d141811273d7079a022a86750a443 +size 18838 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset.meta b/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset.meta new file mode 100644 index 000000000..10312054b --- /dev/null +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/ExitSubtree.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71fd4c1fc79e83a4b9af326332323c28 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset index 3d590a8bc..dfc57475d 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c056ea00663888d9d498dac759d78c1cd3442253b080a0bfddac6eee22b77924 -size 22107 +oid sha256:eb82276e36ca7c53a3674df1108655ddac7cade525c3f24b0045e24f6063cc29 +size 23457 diff --git a/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs index b21a58bd7..0f477171b 100644 --- a/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs +++ b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; namespace DDD @@ -7,11 +8,11 @@ namespace DDD /// - 다양한 캐릭터 AI에서 공통으로 참조하는 현재 인터랙션 타겟만 정의합니다. /// - 필요 시 키-값 확장을 고려하되, 현재는 최소 요구만 충족합니다. /// - public interface IAISharedBlackboard + public interface IAISharedBlackboard where T : Enum { - void SetBlackboardValue(string key, T inValue); + void SetBlackboardValue(T key, T1 inValue); - T GetBlackboardValue(string key); + T1 GetBlackboardValue(T key); } } diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/ExpressEmotion.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/ExpressEmotion.cs index e668ae601..d14f39cf4 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/ExpressEmotion.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/ExpressEmotion.cs @@ -1,7 +1,8 @@ +using System; using Opsive.BehaviorDesigner.Runtime.Tasks; -using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; using Unity.VisualScripting; using UnityEngine; +using Action = Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action; namespace DDD.Restaurant { @@ -11,7 +12,7 @@ public enum EmotionType Satisfied, } - public class ExpressEmotion : Action + public class ExpressEmotion : Action where T : Enum { public interface IEmotionVisual { @@ -21,13 +22,14 @@ public interface IEmotionVisual } //이를 파생해서 기본값을 주거나, 바로 사용하면 될 듯 - [SerializeField] protected string _emotionBlackboardKey; + [SerializeField] protected T _emotionBlackboardKey; private IEmotionVisual _emotionVisual; public override void OnStart() { - var currentEmotion = (EmotionType)m_BehaviorTree.GetVariable(_emotionBlackboardKey).Value; + var blackboard = gameObject.GetComponent>(); + var currentEmotion = blackboard.GetBlackboardValue(_emotionBlackboardKey); _emotionVisual = gameObject.GetComponentInChildren(); if (_emotionVisual == null) diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/LookAtInteractionTarget.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/LookAtInteractionTarget.cs index 8a8aff755..a47fa2003 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/LookAtInteractionTarget.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/LookAtInteractionTarget.cs @@ -1,6 +1,7 @@ +using System; using Opsive.BehaviorDesigner.Runtime.Tasks; -using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; using UnityEngine; +using Action = Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action; namespace DDD.Restaurant { @@ -8,7 +9,7 @@ namespace DDD.Restaurant /// 인터랙션 타겟을 바라보도록 시각(Spine/애니메이션) 컴포넌트에 위임하는 액션의 껍데기/골격. /// 실제 회전/스파인 제어 로직은 별도의 Visual 컴포넌트(예: Spine/Animation Controller)에서 구현하십시오. /// - public class LookAtInteractionTarget : Action + public abstract class LookAtInteractionTarget : Action where T : Enum { [Header("Target Settings")] [Tooltip("InteractionPoints를 사용해 가장 적절한 지점을 바라봄")] @@ -27,19 +28,21 @@ public interface ILookAtVisual } private ILookAtVisual _visual; - private GameObject _cachedTarget; + protected GameObject _cachedTarget; private bool _isLooking; private Vector3 _currentLookPosition; - public override void OnStart() + public sealed override void OnStart() { _visual = gameObject.GetComponentInParent(); _isLooking = false; - var blackboard = gameObject.GetComponent(); + var blackboard = gameObject.GetComponent>(); + InitializeBlackboard(blackboard); - _cachedTarget = blackboard.GetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject)); } + + protected abstract void InitializeBlackboard(IAISharedBlackboard blackboard); public override TaskStatus OnUpdate() { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/MoveToTargetPoint.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/MoveToTargetPoint.cs index 26b4271b8..ae52d41ba 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/MoveToTargetPoint.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/MoveToTargetPoint.cs @@ -1,14 +1,15 @@ +using System; using Opsive.BehaviorDesigner.Runtime.Tasks; -using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; using Unity.VisualScripting; using UnityEngine; +using Action = Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action; namespace DDD.Restaurant { /// /// IAiMovement를 이용해 인터랙션 타겟으로 이동하는 액션 /// - public class MoveToTargetPoint : Action + public abstract class MoveToTargetPoint : Action where T : Enum { [Header("Target Settings")] [Tooltip("InteractionPoints를 사용해 가장 가까운 지점으로 이동")] @@ -32,17 +33,19 @@ public class MoveToTargetPoint : Action private float _repathTimer; private Vector3 _currentDestination; private bool _isMoving; - private GameObject _target; + protected GameObject _target; - public override void OnStart() + public sealed override void OnStart() { _movement = gameObject.GetComponent(); _repathTimer = 0f; _isMoving = false; - var blackboard = gameObject.GetComponent(); - _target = blackboard.GetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject)); + var blackboard = gameObject.GetComponent>(); + InitializeBlackboard(blackboard); } + + protected abstract void InitializeBlackboard(IAISharedBlackboard blackboard); public override TaskStatus OnUpdate() { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs new file mode 100644 index 000000000..6b6068b41 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs @@ -0,0 +1,7 @@ +namespace DDD.Restaurant +{ + public class RestaurantExpressEmotion : ExpressEmotion + { + + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs.meta new file mode 100644 index 000000000..38836eff8 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantExpressEmotion.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 12b0bf82aef64d9d82a77a82943d7878 +timeCreated: 1756692031 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs new file mode 100644 index 000000000..6295e8470 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace DDD.Restaurant +{ + public class RestaurantLookAtInteractionTarget : LookAtInteractionTarget + { + protected override void InitializeBlackboard(IAISharedBlackboard blackboard) + { + _cachedTarget = blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs.meta new file mode 100644 index 000000000..81831c3ae --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantLookAtInteractionTarget.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0d73d4725548490da952ac2079f98497 +timeCreated: 1756692248 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs new file mode 100644 index 000000000..67cf3c055 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace DDD.Restaurant +{ + public class RestaurantMoveToTargetPoint : MoveToTargetPoint + { + protected override void InitializeBlackboard(IAISharedBlackboard blackboard) + { + _target = blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs.meta new file mode 100644 index 000000000..047b67b76 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantMoveToTargetPoint.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e02da400458a473d9131601fc09192c0 +timeCreated: 1756692564 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs new file mode 100644 index 000000000..f1d1074fa --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs @@ -0,0 +1,7 @@ +namespace DDD.Restaurant +{ + public class RestaurantSearchAndRegisterMarker : SearchAndRegisterMarker + { + + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs.meta new file mode 100644 index 000000000..d94b5feda --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/RestaurantSearchAndRegisterMarker.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e62500af8d764eac9b14024f155a168f +timeCreated: 1756693121 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/SearchAndRegisterMarker.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/SearchAndRegisterMarker.cs index 7e4190980..c4fbeea14 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/SearchAndRegisterMarker.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Actions/SearchAndRegisterMarker.cs @@ -1,13 +1,14 @@ +using System; using Opsive.BehaviorDesigner.Runtime.Tasks; -using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; using UnityEngine; +using Action = Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action; namespace DDD.Restaurant { - public class SearchAndRegisterMarker : Action + public class SearchAndRegisterMarker : Action where T : Enum { [SerializeField] private PointType _pointType; - [SerializeField] private RestaurantCustomerBlackboardKey _markerBlackboardKey; + [SerializeField] private T _markerBlackboardKey; private bool _isRegistered; public override void OnStart() @@ -15,13 +16,12 @@ public override void OnStart() var environmentState = RestaurantState.Instance?.EnvironmentState; if (environmentState == null) return; var pointProviders = environmentState.GetPointProviderByType(_pointType); - var blackboard = gameObject.GetComponent(); + var blackboard = gameObject.GetComponent>(); if (blackboard == null) return; foreach (var pointProvider in pointProviders) { - if (!pointProvider.IsSupportsType(_pointType)) continue; - blackboard.SetBlackboardValue(nameof(_markerBlackboardKey), pointProvider.GetGameObject()); + blackboard.SetBlackboardValue(_markerBlackboardKey, pointProvider.GetGameObject()); _isRegistered = true; break; } diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/BlackboardSO.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/BlackboardSO.cs index 45405d752..a4c8b5323 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/BlackboardSO.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/BlackboardSO.cs @@ -1,12 +1,15 @@ using System; using System.Collections.Generic; using Opsive.GraphDesigner.Runtime.Variables; +using Sirenix.OdinInspector; +using Sirenix.Serialization; using UnityEngine; namespace DDD.Restaurant { public class BlackboardSo : ScriptableObject where T : Enum { + [OdinSerialize, ShowInInspector] private Dictionary _variables = new(); public SharedVariable GetVariable(T key) @@ -25,6 +28,7 @@ public void SetVariable(T key, T1 value) if (outVariable != null) { outVariable.Value = value; + _variables[key] = outVariable; } else { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs index 7f6700017..4a4a5bd03 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs @@ -238,7 +238,7 @@ public void Execute(ref DynamicBuffer branchComponents, } [NodeDescription("자식 태스크의 실행 시간을 제한합니다 (GameObject 워크플로우)")] - public class SharedTimeLimiter : DecoratorNode + public class SharedTimeLimiter : DecoratorNode { [Tooltip("최대 실행 시간(초)")] [SerializeField] protected SharedVariable _timeLimit = 30f; @@ -248,7 +248,7 @@ public class SharedTimeLimiter : DecoratorNode [Tooltip("하단 블랙보드 키에 현재 시간을 저장할 지")] [SerializeField] protected bool _isBlackboardWriteEnabled = false; - [SerializeField] protected string _blackboardKey = "CurrentTime"; + [SerializeField] protected T _blackboardKey; public SharedVariable TimeLimit { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs new file mode 100644 index 000000000..610427fc3 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs @@ -0,0 +1,20 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD.Restaurant +{ + public class IncrementOrderCount : Action + { + public override void OnStart() + { + var blackboard = gameObject.GetComponent>(); + if (blackboard == null) + { + Debug.LogWarning($"블랙보드가 존재하지 않음 해시코드: {gameObject.GetHashCode()}"); + return; + } + var cumulativeOrderCount = blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CumulativeOrderCount); + blackboard.SetBlackboardValue(RestaurantCustomerBlackboardKey.CumulativeOrderCount, ++cumulativeOrderCount); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs.meta new file mode 100644 index 000000000..c2be6cc90 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/IncrementOrderCount.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f3f7e66da71042a5b5a679261d1bbf0b +timeCreated: 1756700443 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs new file mode 100644 index 000000000..a81ebb464 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs @@ -0,0 +1,15 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD.Restaurant +{ + public class LeaveRestaurant : Action + { + public override TaskStatus OnUpdate() + { + Object.Destroy(gameObject); + return TaskStatus.Running; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs.meta new file mode 100644 index 000000000..d69d02a89 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/LeaveRestaurant.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e39046ffc9bb46d39d2a5c4a9899cd68 +timeCreated: 1756702274 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs new file mode 100644 index 000000000..834782544 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs @@ -0,0 +1,33 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD.Restaurant +{ + public class PublishRestaurantInterruptEvent : Action + { + [SerializeField] private RestaurantOrderType _targetInterruptType; + public override TaskStatus OnUpdate() + { + var blackboard = gameObject.GetComponent>(); + if (blackboard == null) return TaskStatus.Failure; + + var currentTarget = blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject); + if (currentTarget == null) return TaskStatus.Failure; + + var orderObject = currentTarget.GetComponent(); + if (orderObject == null) return TaskStatus.Failure; + + RestaurantOrderInterrupt evt = new() + { + Table = currentTarget, + OrderObject = orderObject.GetOrderObjectState(), + TransitionType = _targetInterruptType + }; + + EventBus.Broadcast(evt); + + return TaskStatus.Success; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs.meta new file mode 100644 index 000000000..df7c9d6cb --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/PublishRestaurantInterruptEvent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: aaaf550a60264509a1ebd35506000e2b +timeCreated: 1756706679 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/SatisfactionEvaluator.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/SatisfactionEvaluator.cs index 483191762..81b2e6abc 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/SatisfactionEvaluator.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/SatisfactionEvaluator.cs @@ -14,13 +14,13 @@ public enum EvaluationStep [NodeDescription("만족도 평가 테스크")] public class SatisfactionEvaluator : Action { - [SerializeField] private string _satisfactionBlackboardKey; + [SerializeField] private RestaurantCustomerBlackboardKey _satisfactionBlackboardKey; [SerializeField] private EvaluationStep _evaluationStep; public override void OnStart() { var currentSatisfaction = CalculateSatisfaction(); - var blackboard = gameObject.GetComponent(); - blackboard.SetBlackboardValue(_satisfactionBlackboardKey, (int)currentSatisfaction); + var blackboard = gameObject.GetComponent>(); + blackboard.SetBlackboardValue(_satisfactionBlackboardKey, currentSatisfaction); } //TODO 만족도 계산? diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/StartRestaurantOrder.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/StartRestaurantOrder.cs index 805caab1b..4f2081e47 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/StartRestaurantOrder.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/StartRestaurantOrder.cs @@ -22,8 +22,8 @@ public override void OnStart() public override TaskStatus OnUpdate() { - var blackboard = gameObject.GetComponent(); - var target = blackboard?.GetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject)); + var blackboard = gameObject.GetComponent>(); + var target = blackboard?.GetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject); IInteractable currentInteractable = target?.GetComponent(); if (_targetOrderType == RestaurantOrderType.Wait) { @@ -33,8 +33,8 @@ public override TaskStatus OnUpdate() { return TaskStatus.Failure; } - var customerBlackboard = gameObject.GetComponent(); - customerBlackboard?.SetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject), currentInteractable.GetInteractableGameObject()); + var customerBlackboard = gameObject.GetComponent>(); + customerBlackboard?.SetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject, currentInteractable.GetInteractableGameObject()); } // Check order type of the current interactable @@ -70,8 +70,8 @@ public override TaskStatus OnUpdate() if (_targetOrderType == RestaurantOrderType.Busy) { - var customerBlackboard = gameObject.GetComponent(); - customerBlackboard?.SetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject), null); + var customerBlackboard = gameObject.GetComponent>(); + customerBlackboard?.SetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject, null); } return TaskStatus.Success; diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/WaitForPlayerInteraction.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/WaitForPlayerInteraction.cs index fd8338fbf..3150c0bc3 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/WaitForPlayerInteraction.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Actions/WaitForPlayerInteraction.cs @@ -16,10 +16,10 @@ public class WaitForPlayerInteraction : Action public override void OnStart() { GameObject interactionTarget = null; - if (!gameObject.TryGetComponent(out var sharedBlackboard)) return; + if (!gameObject.TryGetComponent>(out var sharedBlackboard)) return; interactionTarget = sharedBlackboard.GetBlackboardValue( - nameof(RestaurantCustomerBlackboardKey.CurrentTargetGameObject)); + RestaurantCustomerBlackboardKey.CurrentTargetGameObject); if (interactionTarget == null) { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs new file mode 100644 index 000000000..5f6b7dc59 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs @@ -0,0 +1,54 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals; +using UnityEngine; + +namespace DDD.Restaurant +{ + public class CheckCumulateOrderCount : Conditional + { + public enum ComparisonType + { + Less, + LessOrEqual, + Equal, + NotEqual, + Greater, + GreaterOrEqual + } + + [SerializeField] private int _compareOrderCount; + [SerializeField] private ComparisonType _comparisonType; + public override TaskStatus OnUpdate() + { + var blackboard = gameObject.GetComponent>(); + if (blackboard == null) + { + Debug.LogWarning($"블랙보드가 존재하지 않음 해시코드: {gameObject.GetHashCode()}"); + return TaskStatus.Failure; + } + var cumulativeOrderCount = blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CumulativeOrderCount); + return Evaluate(cumulativeOrderCount) ? TaskStatus.Success : TaskStatus.Failure; + } + + private bool Evaluate(int compareValue) + { + switch (_comparisonType) + { + case ComparisonType.Less: + return compareValue < _compareOrderCount; + case ComparisonType.LessOrEqual: + return compareValue <= _compareOrderCount; + case ComparisonType.Equal: + return compareValue == _compareOrderCount; + case ComparisonType.NotEqual: + return compareValue != _compareOrderCount; + case ComparisonType.Greater: + return compareValue > _compareOrderCount; + case ComparisonType.GreaterOrEqual: + return compareValue >= _compareOrderCount; + default: + return false; + } + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs.meta new file mode 100644 index 000000000..7b8028ec7 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Conditionals/CheckCumulateOrderCount.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4b3c5ee2ca89419394819e57dbab0bcd +timeCreated: 1756701161 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardComponent.cs index ed6398a68..e9bda17dd 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardComponent.cs @@ -1,36 +1,68 @@ +using DDD.Restaurant; using Opsive.BehaviorDesigner.Runtime; using Opsive.GraphDesigner.Runtime.Variables; +using Sirenix.OdinInspector; using UnityEngine; namespace DDD { - public class CustomerBlackboardComponent : MonoBehaviour, ICustomerBlackboard, IAISharedBlackboard + public class CustomerBlackboardComponent : MonoBehaviour, ICustomerBlackboard, IAISharedBlackboard { private BehaviorTree _behaviorTree; + [SerializeField, InlineEditor] + private CustomerBlackboardSo _blackboardSo; public void InitializeWithBehaviorTree(BehaviorTree inBehaviorTree) { _behaviorTree = inBehaviorTree; - SetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.SelfGameObject), gameObject); + + _blackboardSo = ScriptableObject.CreateInstance(); + _blackboardSo.SetVariable(RestaurantCustomerBlackboardKey.SelfGameObject, gameObject); + + if (!_behaviorTree) return; + _behaviorTree.SetVariableValue(nameof(BlackboardKey.RestaurantBlackboard), _blackboardSo); } public void SetCustomerData(string inCustomerDataId) { - SetBlackboardValue(nameof(RestaurantCustomerBlackboardKey.CustomerDataId), inCustomerDataId); + _blackboardSo.SetVariable(RestaurantCustomerBlackboardKey.CustomerDataId, inCustomerDataId); } - public void SetBlackboardValue(string key, T inValue) + public void SetBlackboardValue(RestaurantCustomerBlackboardKey key, T inValue) { if (!_behaviorTree) return; - _behaviorTree.SetVariableValue(key, inValue); + + var blackboardSo = + _behaviorTree.GetVariable(nameof(BlackboardKey.RestaurantBlackboard)); + if (blackboardSo == null || blackboardSo.Value == null) + { + Debug.LogWarning($"behaviorTree에 blackboardSo가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return; + } + blackboardSo.Value.SetVariable(key, inValue); } - public T GetBlackboardValue(string key) + public T GetBlackboardValue(RestaurantCustomerBlackboardKey key) { if (!_behaviorTree) return default; - SharedVariable blackboardValue = _behaviorTree.GetVariable(key); + var blackboardSo = + _behaviorTree.GetVariable(nameof(BlackboardKey.RestaurantBlackboard)); - return blackboardValue != null ? blackboardValue.Value : default; + if (blackboardSo == null || blackboardSo.Value == null) + { + Debug.LogWarning($"behaviorTree에 blackboardSo가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return default; + } + var value = blackboardSo.Value.GetVariable(key); + return value != null ? value.Value : default; + } + + private void OnDestroy() + { + if (_blackboardSo) + { + Destroy(_blackboardSo); + } } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs new file mode 100644 index 000000000..51919eaad --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs @@ -0,0 +1,12 @@ + +using System; +using UnityEngine; + +namespace DDD.Restaurant +{ + [Serializable] + public class CustomerBlackboardSo : BlackboardSo + { + + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs.meta new file mode 100644 index 000000000..44c14ea18 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/CustomerBlackboardSo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b5d5fca67b054314aef1ee6f3fda2b76 +timeCreated: 1756689633 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs index f3e211edb..b4a56660e 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs @@ -3,9 +3,9 @@ namespace DDD.Restaurant { - public class CustomerTimeLimiter : SharedTimeLimiter + public class CustomerTimeLimiter : SharedTimeLimiter { - private IAISharedBlackboard _blackboard; + private IAISharedBlackboard _blackboard; public override void OnStart() { base.OnStart(); diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs index 04cfef17a..768c70b7f 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs @@ -2,13 +2,18 @@ namespace DDD { + public enum BlackboardKey + { + RestaurantBlackboard, + } public enum RestaurantCustomerBlackboardKey { SelfGameObject, CustomerDataId, CurrentTargetGameObject, SatisfactionLevel, - OrderCount, + CumulativeOrderCount, + Remaining } public interface ICustomerBlackboard diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs index 4248d0aa1..0102a617b 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Npc/NpcMovement.cs @@ -60,6 +60,7 @@ public bool TryMoveToPosition(Vector3 position) _iAstarAi.destination = position; PlayMove(); + _iAstarAi.SearchPath(); return true; } diff --git a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs index 6b8a4ad8d..867d6abe4 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.Serialization; -namespace DDD +namespace DDD.Restaurant { public enum RestaurantOrderType : uint { @@ -21,6 +21,16 @@ public class RestaurantOrderObjectState public string FoodId; } + + public class RestaurantOrderInterrupt : IEvent + { + public GameObject Table; + public RestaurantOrderObjectState OrderObject; + public RestaurantOrderType TransitionType; + } + + // RestaurantOrderInterrupt 이벤트 ? OrderObject, Worker는 여기에 등록해두기. Customer가 이벤트 호출 + // InterruptResult - Clean, Dirty? public interface IRestaurantOrderObject { @@ -31,7 +41,7 @@ public interface IRestaurantOrderObject // TODO : 도중에 이탈할 경우, 순차적으로 다음 페이즈로 넘어가는 게 아니라 바로 Wait, Dirty로 전이시킬 필요가 있음 - public class InteractionSubsystem_Order : MonoBehaviour, IInteractionSubsystemObject, IRestaurantOrderObject + public class InteractionSubsystem_Order : MonoBehaviour, IInteractionSubsystemObject, IRestaurantOrderObject, IEventHandler { [SerializeField] private RestaurantOrderType _currentRestaurantOrderType = RestaurantOrderType.Wait; [SerializeField] private RestaurantOrderObjectState _orderObjectState = new(); @@ -80,6 +90,7 @@ public ScriptableObject GetPayload() public void InitializeSubsystem() { + EventBus.Register(this); } public RestaurantOrderType GetInteractionSubsystemType() @@ -110,5 +121,17 @@ public bool CanTransitionToNextPhase() { return true; } + + public void HandleEvent(RestaurantOrderInterrupt evt) + { + if (evt.Table != gameObject) return; + Debug.Log($"Order Interrupt : {evt.TransitionType}, Current State : {GetInteractionSubsystemType()}"); + SetInteractionSubsystemType(evt.TransitionType); + } + + private void OnDestroy() + { + EventBus.Unregister(this); + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs b/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs deleted file mode 100644 index 7ef165c00..000000000 --- a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using UnityEngine; - -namespace DDD.Restaurant -{ - //public class RestaurantEnvironmentPointQueryEvent : RestaurantEventBase - //{ - // protected override bool EventSolve(GameObject causer, GameObject target, PointType eventType, ScriptableObject payload) - // { - // if (!target.TryGetComponent(out IEnvironmentPointProvider provider)) return false; - // if (!provider.IsSupportsType(eventType)) return false; - // - // return true; - // } - //} -} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs.meta deleted file mode 100644 index 55939787b..000000000 --- a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantEnvironmentPointQueryEvent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 17b28cfc7a5a4d43a050d247e22004dc -timeCreated: 1756453073 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantInteractionEvents.cs b/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantInteractionEvents.cs index f33d3189c..ede0745b1 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/RestaurantInteractionEvents.cs @@ -24,30 +24,20 @@ public class RestaurantInteractionEvent : RestaurantEventBase protected override bool EventSolve(GameObject causer, GameObject target, InteractionType interactionType, ScriptableObject payload) { - IInteractor interactor = causer.GetComponent(); - if (interactor != null && interactor.CanSolveInteractionType(interactionType)) + var interactor = causer.GetComponent(); + if (interactor == null || !interactor.CanSolveInteractionType(interactionType)) return false; + if (!interactor.FetchSolverTypeForInteraction(interactionType, out var solverType)) return false; + // Solve event directly. 이벤트 처리는 여기서 하고, 이벤트 호출로는 이런 이벤트가 호출되었고 결과가 어떻다는 거 전파하는 식으로. + if (solverType == null) return false; + var solver = causer.GetComponent(solverType) as IInteractionSolver; + var interactable = target.GetComponent(); + if (solver is not null) { - if (interactor.FetchSolverTypeForInteraction(interactionType, out var solverType)) - { - // Solve event directly. 이벤트 처리는 여기서 하고, 이벤트 호출로는 이런 이벤트가 호출되었고 결과가 어떻다는 거 전파하는 식으로. - if (solverType != null) - { - IInteractionSolver solver = causer.GetComponent(solverType) as IInteractionSolver; - IInteractable interactable = target.GetComponent(); - if (solver is not null) - { - bool canExecute = solver.CanExecuteInteraction(interactor, interactable, payload); - return canExecute && solver.ExecuteInteraction(interactor, interactable, payload); - } - else - { - // Should not reach here! - Debug.Assert(false, "Solver Component or Interactor is null"); - } - } - } + bool canExecute = solver.CanExecuteInteraction(interactor, interactable, payload); + return canExecute && solver.ExecuteInteraction(interactor, interactable, payload); } + Debug.Assert(false, "Solver Component or Interactor is null"); return false; } } From b7ad8ebae9d65338283230c32861aebc62cf24eb Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 16:38:42 +0900 Subject: [PATCH 09/13] =?UTF-8?q?Bill=20=EC=9D=8C=EC=8B=9D=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs index 4624d793c..8df145532 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs @@ -20,6 +20,7 @@ public void HandleEvent(RestaurantOrderEvent evt) { var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform); var sprite = DataManager.Instance.GetSprite(evt.OrderObjectState?.FoodId); + billItem.GetComponent().sprite = sprite; } } } \ No newline at end of file From 14f30ce1e571e884fc55bcaa67b3bbaafe16ccc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Mon, 1 Sep 2025 16:45:48 +0900 Subject: [PATCH 10/13] =?UTF-8?q?CustomerPatienceUiComponent=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ui/OrderUi/CustomerPatienceUiComponent.cs | 26 +++++++++++++++++++ .../CustomerPatienceUiComponent.cs.meta | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs create mode 100644 Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs.meta diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs new file mode 100644 index 000000000..2a4b38eaf --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace DDD.Restaurant +{ + public class CustomerPatienceUiComponent : MonoBehaviour + { + private IAISharedBlackboard _blackboard; + [SerializeField] HashSet _targetOrderType; + [SerializeField] RestaurantOrderType _currentOrderType; + private void Start() + { + if (!TryGetComponent(out _blackboard)) + { + Debug.LogWarning($"[{GetType().Name}] 블랙보드가 존재하지 않음 오브젝트 해시코드 {gameObject.GetHashCode()}"); + return; + } + + } + + private void Update() + { + + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs.meta b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs.meta new file mode 100644 index 000000000..75543c032 --- /dev/null +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e509fdc10cff4d3487080f126f32544f +timeCreated: 1756711651 \ No newline at end of file From 0ee71d53d8a93a815691910cca7b6e82e549d2f0 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 17:55:04 +0900 Subject: [PATCH 11/13] =?UTF-8?q?=EC=B0=BD=EB=AC=B8=20=ED=81=AC=EA=B8=B0?= =?UTF-8?q?=20=EB=A7=9E=EC=B6=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/Restaurant/Environments/Props/Prop_Window.prefab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_Window.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_Window.prefab index d675dc623..bb62a1562 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_Window.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_Window.prefab @@ -148,8 +148,8 @@ Transform: m_GameObject: {fileID: 4383536863636501606} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.01} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: -0.05, z: 0.01} + m_LocalScale: {x: 1.1, y: 1.1, z: 1.1} m_ConstrainProportionsScale: 1 m_Children: [] m_Father: {fileID: 4689806172687901599} From dfe19cbb4c48c0ddb1cda476a2f29e5d4acd0250 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Mon, 1 Sep 2025 17:55:26 +0900 Subject: [PATCH 12/13] =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20Se?= =?UTF-8?q?rve=20=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 14 ++++++++- .../_Scripts/Game/GameObject/VirtualItem.cs | 2 +- .../Character/Core/CharacterCarrier.cs | 16 +++++++--- .../Character/Player/PlayerCharacter.cs | 1 + .../InteractionSubsystem_Order.cs | 2 ++ .../RestaurantOrderSolver_Order.cs | 8 +++-- .../RestaurantOrderSolver_Serve.cs | 31 ++++++++++++++++++- .../_Scripts/Restaurant/Ui/Hud/BillHud.cs | 23 ++++++++++++-- .../Component/PropUiDisplayComponent.cs | 7 ++--- .../Component/RestaurantUiDisplayComponent.cs | 15 +++++++-- Assets/_DDD/_Scripts/Utilities/Constants.cs | 6 ++++ 11 files changed, 105 insertions(+), 20 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 5d6eeb540..59c8fd213 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -167,7 +167,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 2 + Data: 3 - Name: Entry: 7 Data: @@ -192,6 +192,18 @@ MonoBehaviour: - Name: Entry: 8 Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 8 + - Name: $v + Entry: 10 + Data: 1 + - Name: + Entry: 8 + Data: - Name: Entry: 13 Data: diff --git a/Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs b/Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs index 883993f82..576bd631b 100644 --- a/Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs +++ b/Assets/_DDD/_Scripts/Game/GameObject/VirtualItem.cs @@ -11,7 +11,7 @@ public VirtualItem(string itemId) _itemId = itemId; } - public string GetCarrierId() => _itemId; + public string GetId() => _itemId; public CarriableType GetCarriableType() => CarriableType.VirtualItem; public GameObject GetGameObject() => null; diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Core/CharacterCarrier.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Core/CharacterCarrier.cs index 81abaa03d..d2624418a 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Core/CharacterCarrier.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Core/CharacterCarrier.cs @@ -12,8 +12,9 @@ public enum CarriableType public interface ICarrier { GameObject GetCarrierGameObject(); - string GetCarrierId(); + string GetCurrentCarriableId(); ICarriable GetCurrentCarriable(); + bool IsCarrying(); bool CanCarryTo(ICarriable carriable); void Carry(ICarriable carriable); void Use(ICarriable carriable); @@ -21,7 +22,7 @@ public interface ICarrier public interface ICarriable { - string GetCarrierId(); + string GetId(); CarriableType GetCarriableType(); void OnCarried(ICarrier carrier); bool CanCarry(); @@ -40,9 +41,9 @@ public GameObject GetCarrierGameObject() return gameObject; } - public string GetCarrierId() + public string GetCurrentCarriableId() { - return _currentCarriable.GetCarrierId(); + return _currentCarriable.GetId(); } public ICarriable GetCurrentCarriable() @@ -50,6 +51,11 @@ public ICarriable GetCurrentCarriable() return _currentCarriable; } + public bool IsCarrying() + { + return GetCurrentCarriable() != null; + } + public bool CanCarryTo(ICarriable carriable) { if (_currentCarriable != null) return false; @@ -65,7 +71,7 @@ public void Carry(ICarriable carriable) _currentCarriable.OnCarried(this); _speechBubble ??= GetComponentInChildren(); - _speechBubble?.Show(_currentCarriable.GetCarrierId()); + _speechBubble?.Show(_currentCarriable.GetId()); } public void Use(ICarriable carriable) diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Player/PlayerCharacter.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Player/PlayerCharacter.cs index 1abe46f50..26e4a26ef 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Player/PlayerCharacter.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Player/PlayerCharacter.cs @@ -2,6 +2,7 @@ namespace DDD.Restaurant { + [RequireComponent(typeof(CharacterCarrier))] [RequireComponent(typeof(PlayerMovement))] public class PlayerCharacter : RestaurantCharacter { diff --git a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs index 5384e5cb6..8322d98c0 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Environment/Interactions/InteractionSubsystem_Order.cs @@ -21,6 +21,8 @@ public class RestaurantOrderObjectState public string RecipeId; public string FoodId; + + public string ServedFoodId; } public interface IRestaurantOrderObject diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs index a03a0bbff..240f7c00c 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs @@ -16,6 +16,7 @@ public string MenuId public class RestaurantOrderEvent : IEvent { public RestaurantOrderObjectState OrderObjectState; + public RestaurantOrderType OrderPhase; } public class RestaurantOrderSolver_Order : RestaurantOrderSolverBase @@ -53,8 +54,11 @@ public override bool ExecuteInteractionSubsystem(IInteractor interactor, IIntera RestaurantOrderMenuPayload orderPayload = ScriptableObject.CreateInstance(); orderPayload.MenuId = recipeMenu; - RestaurantOrderEvent evt = new RestaurantOrderEvent(); - evt.OrderObjectState = orderObject?.GetOrderObjectState(); + RestaurantOrderEvent evt = new RestaurantOrderEvent + { + OrderObjectState = orderObject?.GetOrderObjectState() + , OrderPhase = RestaurantOrderType.Order + }; EventBus.Broadcast(evt); return base.ExecuteInteractionSubsystem(interactor, interactable, payload); diff --git a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs index d4718a97d..351c6749b 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Event/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs @@ -6,11 +6,40 @@ public class RestaurantOrderSolver_Serve : RestaurantOrderSolverBase { public override bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { - return base.ExecuteInteractionSubsystem(interactor, interactable, payload); + var carrier = interactor?.GetInteractorGameObject()?.GetComponent(); + if(carrier == null) return false; + var orderObject = GetRestaurantOrderObject(interactable); + if(orderObject == null) return false; + if(carrier.GetCurrentCarriable() == null) return false; + + string carriedFoodId = carrier.GetCurrentCarriableId(); + orderObject.GetOrderObjectState().ServedFoodId = carriedFoodId; + + bool result = base.ExecuteInteractionSubsystem(interactor, interactable, payload); + + // ExecuteInteractionSubsystem 이후에 음식 제거 - 미리 제거하면 CanExecute 통과 못 함 + carrier.Use(carrier.GetCurrentCarriable()); + + // OnFoodServed (Consume Bill Hud item) + RestaurantOrderEvent evt = new RestaurantOrderEvent + { + OrderObjectState = orderObject?.GetOrderObjectState() + , OrderPhase = RestaurantOrderType.Serve + }; + EventBus.Broadcast(evt); + + return result; } public override bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { + // Does interactor carry any food? + var carrier = interactor?.GetInteractorGameObject()?.GetComponent(); + if (carrier != null) + { + return carrier.IsCarrying(); + } + return false; } } diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs index 8df145532..9117c2102 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; @@ -8,6 +9,7 @@ public class BillHud : MonoBehaviour, IEventHandler { [SerializeField] private RectTransform _billItemsLayoutTransform; [SerializeField] private GameObject _billItemPrefab; + private readonly Dictionary _billItemMap = new(); private void Start() { @@ -18,9 +20,24 @@ private void Start() public void HandleEvent(RestaurantOrderEvent evt) { - var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform); - var sprite = DataManager.Instance.GetSprite(evt.OrderObjectState?.FoodId); - billItem.GetComponent().sprite = sprite; + if (evt.OrderPhase == RestaurantOrderType.Order) + { + var orderState = evt.OrderObjectState; + if (orderState == null) return; + var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform); + var sprite = DataManager.Instance.GetSprite(orderState.FoodId); + billItem.GetComponent().sprite = sprite; + _billItemMap[orderState.Customer] = billItem; + } + else if (evt.OrderPhase == RestaurantOrderType.Serve) + { + // Find bill item by customer from _billItemMap, then destroy it. + if (_billItemMap.TryGetValue(evt.OrderObjectState.Customer, out var billItem)) + { + Destroy(billItem); + _billItemMap.Remove(evt.OrderObjectState.Customer); + } + } } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs index a8d034ae6..412581a87 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/PropUiDisplayComponent.cs @@ -32,9 +32,8 @@ protected virtual void Initialize() Debug.LogError($"Interaction Subsystem<{typeof(T)}> is not exist"); return; } - - // TODO: 임시 나중에 제대로 수정할 것 - var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform); + + var uiGameObject = Instantiate(new GameObject("PropWorldUi"), transform); _spriteRenderer = uiGameObject.AddComponent(); UpdateSprite(); @@ -67,7 +66,7 @@ private bool GetOwnerInteractable(out IInteractable interactable) protected virtual int GetDisplayLayer() { - return LayerMask.NameToLayer("WorldUI"); + return LayerMask.NameToLayer(LayerConstants.WorldUi); } protected virtual Sprite GetDisplaySprite() diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs index aa8d0454e..56880d5a5 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/Component/RestaurantUiDisplayComponent.cs @@ -37,7 +37,11 @@ protected override void UpdateSpriteTransform() protected override Sprite GetDisplaySprite() { - if (GetCurrentInteractionType() == RestaurantOrderType.Serve && _interactionSubsystemObject != null) + if (_interactionSubsystemObject == null) + return base.GetDisplaySprite(); + + if (GetCurrentInteractionType() == RestaurantOrderType.Serve || + GetCurrentInteractionType() == RestaurantOrderType.Busy) { // Sprite by current restaurant order type. get from RestaurantOrderObject. if (_interactionSubsystemObject is IRestaurantOrderObject orderObject) @@ -76,9 +80,14 @@ protected override Vector3 GetDisplayPosition() protected override int GetDisplayLayer() { - if (GetCurrentInteractionType() == RestaurantOrderType.Serve) + if (GetCurrentInteractionType() != RestaurantOrderType.Serve && + GetCurrentInteractionType() != RestaurantOrderType.Busy) { - return LayerMask.NameToLayer("Prop"); + return LayerMask.NameToLayer(LayerConstants.Prop); + } + else + { + return LayerMask.NameToLayer(LayerConstants.WorldUi); } return base.GetDisplayLayer(); } diff --git a/Assets/_DDD/_Scripts/Utilities/Constants.cs b/Assets/_DDD/_Scripts/Utilities/Constants.cs index 8bc7ccd7a..e89072d85 100644 --- a/Assets/_DDD/_Scripts/Utilities/Constants.cs +++ b/Assets/_DDD/_Scripts/Utilities/Constants.cs @@ -66,4 +66,10 @@ public static class SpriteConstants public const string EmptyFoodSpriteKey = "EmptyFood"; public const string EmptyWorker = "EmptyWorker"; } + + public static class LayerConstants + { + public const string Prop = "Prop"; + public const string WorldUi = "WorldUI"; + } } \ No newline at end of file From 5e8f08a7b99407cdd5a75c858bcc6671d81c2f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Mon, 1 Sep 2025 18:01:34 +0900 Subject: [PATCH 13/13] =?UTF-8?q?CustomerPatienceUiComponent=20=EC=88=98?= =?UTF-8?q?=EC=A0=95:=20=EC=83=81=ED=83=9C=20=EC=B4=88=EA=B8=B0=ED=99=94?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80,=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=8D=94?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=ED=95=9C=20RemainingPatienceTime=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=81=ED=99=94=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84,=20=EA=B4=80=EB=A0=A8=20Prefab=20=EB=B0=8F=20?= =?UTF-8?q?=EB=B8=94=EB=9E=99=EB=B3=B4=EB=93=9C=20Key=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Subtree/OrderSubtree.asset | 4 +- .../_Addressables/Prefabs/CustomerNpc.prefab | 350 +++++++++++++++++- .../AI/Common/Decorator/TimeLimiter.cs | 3 +- .../Customer/Decorator/CustomerTimeLimiter.cs | 3 +- .../Interfaces/ICustomerBlackboard.cs | 3 +- .../Ui/OrderUi/CustomerPatienceUiComponent.cs | 78 +++- 6 files changed, 425 insertions(+), 16 deletions(-) diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset index dfc57475d..38908aa26 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb82276e36ca7c53a3674df1108655ddac7cade525c3f24b0045e24f6063cc29 -size 23457 +oid sha256:202ad7081128e8607b69e2698acfbaf2ef9ea1adf22f382fb4c19b0f6f623f72 +size 23569 diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 4e2728746..ae9e28304 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -1,5 +1,280 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &633131044254461841 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3251801155585931500} + m_Layer: 10 + m_Name: Fill Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3251801155585931500 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 633131044254461841} + 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: 609795798002784246} + m_Father: {fileID: 4124712097831813607} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &6108830054777696831 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 609795798002784246} + - component: {fileID: 5096550498312619918} + - component: {fileID: 6088464776038824938} + m_Layer: 10 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &609795798002784246 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6108830054777696831} + 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: 3251801155585931500} + 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: 10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5096550498312619918 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6108830054777696831} + m_CullTransparentMesh: 1 +--- !u!114 &6088464776038824938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6108830054777696831} + 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: 0, b: 0, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, 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 &6934217169991235231 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6896730674754028691} + - component: {fileID: 2778170821913614564} + - component: {fileID: 5385555677689984514} + m_Layer: 10 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6896730674754028691 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6934217169991235231} + 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: 4124712097831813607} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2778170821913614564 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6934217169991235231} + m_CullTransparentMesh: 1 +--- !u!114 &5385555677689984514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6934217169991235231} + 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: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 0 + 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 &7478348093145584255 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4124712097831813607} + - component: {fileID: 290174062369355600} + m_Layer: 10 + m_Name: Slider + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4124712097831813607 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7478348093145584255} + 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: 6896730674754028691} + - {fileID: 3251801155585931500} + m_Father: {fileID: 6787772463908443990} + 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, y: -122.7} + m_SizeDelta: {x: 80, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &290174062369355600 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7478348093145584255} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, 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: 6088464776038824938} + m_FillRect: {fileID: 609795798002784246} + m_HandleRect: {fileID: 0} + m_Direction: 0 + m_MinValue: 0 + m_MaxValue: 1 + m_WholeNumbers: 0 + m_Value: 1 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] --- !u!1001 &6675463944788402332 PrefabInstance: m_ObjectHideFlags: 0 @@ -8,6 +283,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1177268455256782109, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_BlockingMask.m_Bits + value: 1023 + objectReference: {fileID: 0} - target: {fileID: 2686192822530022837, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_IsTrigger value: 1 @@ -1686,11 +1965,11 @@ PrefabInstance: objectReference: {fileID: 11400000, guid: 90ef4d2128c770b4cb83806c33867a79, type: 2} - target: {fileID: 4246001044237372826, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 6 + value: 10 objectReference: {fileID: 0} - target: {fileID: 4900607124439125211, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 6 + value: 10 objectReference: {fileID: 0} - target: {fileID: 5108021082109611361, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: _availableInteractions @@ -1698,7 +1977,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5523461449651244940, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 6 + value: 10 objectReference: {fileID: 0} - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: gravity.x @@ -1726,7 +2005,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6312111630636169229, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 6 + value: 10 objectReference: {fileID: 0} - target: {fileID: 6336425934484470474, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_SortingOrder @@ -1754,7 +2033,11 @@ PrefabInstance: objectReference: {fileID: 2100000, guid: d018debe5b8bedf4c8f19cba9e4facec, type: 2} - target: {fileID: 6558328110360087691, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 6 + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 6558328110360087691, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} - target: {fileID: 6826437533270866908, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: externalBehavior @@ -1799,7 +2082,10 @@ PrefabInstance: m_RemovedComponents: - {fileID: 133104368464330048, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} m_RemovedGameObjects: [] - m_AddedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 186617915120465866, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + insertIndex: -1 + addedObject: {fileID: 4124712097831813607} m_AddedComponents: - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} insertIndex: -1 @@ -1813,6 +2099,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} insertIndex: -1 addedObject: {fileID: 7166420413980924482} + - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + insertIndex: -1 + addedObject: {fileID: 7529813704779128435} m_SourcePrefab: {fileID: 100100000, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} --- !u!1 &4266090516809920735 stripped GameObject: @@ -1843,6 +2132,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 784c770c13244dc0a0804056065eaf92, type: 3} m_Name: m_EditorClassIdentifier: + _blackboardSo: {fileID: 0} --- !u!114 &3825874317044733320 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2055,3 +2345,51 @@ MonoBehaviour: hitFxFadeOutDuration: 0.25 hitFxColor: {r: 1, g: 1, b: 1, a: 1} hitFxRadius: 0.5 +--- !u!114 &7529813704779128435 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266090516809920735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e509fdc10cff4d3487080f126f32544f, type: 3} + m_Name: + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: _targetOrderType + Entry: 7 + Data: 0|System.Collections.Generic.HashSet`1[[DDD.Restaurant.RestaurantOrderType, + Assembly-CSharp]], System.Core + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 3 + Data: 4 + - Name: + Entry: 3 + Data: 2 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + _currentOrderType: 0 + _prevOrderType: 0 + _patienceSlider: {fileID: 0} +--- !u!224 &6787772463908443990 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 186617915120465866, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + m_PrefabInstance: {fileID: 6675463944788402332} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs index 4a4a5bd03..332990eb1 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Common/Decorator/TimeLimiter.cs @@ -248,7 +248,8 @@ public class SharedTimeLimiter : DecoratorNode [Tooltip("하단 블랙보드 키에 현재 시간을 저장할 지")] [SerializeField] protected bool _isBlackboardWriteEnabled = false; - [SerializeField] protected T _blackboardKey; + [SerializeField] protected T _remainTimeblackboardKey; + [SerializeField] protected T _maxTimeblackboardKey; public SharedVariable TimeLimit { diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs index b4a56660e..94d38de25 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/AI/Customer/Decorator/CustomerTimeLimiter.cs @@ -14,13 +14,14 @@ public override void OnStart() { Debug.LogError($"[{GetType().Name}] 블랙보드를 찾을 수 없습니다. 게임오브젝트 해시코드: {gameObject.GetHashCode()}"); } + _blackboard.SetBlackboardValue(_maxTimeblackboardKey, TimeLimit.Value); } public override TaskStatus OnUpdate() { if (_isBlackboardWriteEnabled && _blackboard != null) { - _blackboard.SetBlackboardValue(_blackboardKey, Time.time - _startTime); + _blackboard.SetBlackboardValue(_remainTimeblackboardKey, TimeLimit.Value - (Time.time - _startTime)); } return base.OnUpdate(); diff --git a/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs b/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs index 768c70b7f..e88fc8167 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Character/Interfaces/ICustomerBlackboard.cs @@ -13,7 +13,8 @@ public enum RestaurantCustomerBlackboardKey CurrentTargetGameObject, SatisfactionLevel, CumulativeOrderCount, - Remaining + MaxPatienceTime, + RemainingPatienceTime } public interface ICustomerBlackboard diff --git a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs index 2a4b38eaf..cdc6560c2 100644 --- a/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs +++ b/Assets/_DDD/_Scripts/Restaurant/Ui/OrderUi/CustomerPatienceUiComponent.cs @@ -1,26 +1,94 @@ using System.Collections.Generic; +using Sirenix.OdinInspector; +using Sirenix.Serialization; using UnityEngine; +using UnityEngine.UI; namespace DDD.Restaurant { - public class CustomerPatienceUiComponent : MonoBehaviour + public class CustomerPatienceUiComponent : SerializedMonoBehaviour { private IAISharedBlackboard _blackboard; - [SerializeField] HashSet _targetOrderType; - [SerializeField] RestaurantOrderType _currentOrderType; + [OdinSerialize] private HashSet _targetOrderType = new(); + [SerializeField] private RestaurantOrderType _currentOrderType; + [SerializeField] private RestaurantOrderType _prevOrderType; + private bool _initialized; + private IInteractionSubsystemObject _subsystem; + + [SerializeField] private Slider _patienceSlider; private void Start() { - if (!TryGetComponent(out _blackboard)) + var canvas = GetComponentInChildren(); + canvas.worldCamera = Camera.main; + + _patienceSlider = GetComponentInChildren(); + if (_patienceSlider == null) { - Debug.LogWarning($"[{GetType().Name}] 블랙보드가 존재하지 않음 오브젝트 해시코드 {gameObject.GetHashCode()}"); + Debug.LogWarning($"[{GetType().Name}] 슬라이더가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); return; } + if (!TryGetComponent(out _blackboard)) + { + Debug.LogWarning($"[{GetType().Name}] 블랙보드가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return; + } + + var targetObject = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.CurrentTargetGameObject); + if (targetObject == null) + { + Debug.LogWarning($"[{GetType().Name}] 타겟 오브젝트가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return; + } + + if (!targetObject.TryGetComponent(out var subsystemOwner)) + { + Debug.LogWarning($"[{GetType().Name}] 서브시스템 오너가 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return; + } + subsystemOwner.TryGetSubsystemObject(out _subsystem); + + if (_subsystem == null) + { + Debug.LogWarning($"[{GetType().Name}] RestaurantOrderType 서브시스템이 존재하지 않음 오브젝트 해시코드: {gameObject.GetHashCode()}"); + return; + } + + _currentOrderType = _subsystem.GetInteractionSubsystemType(); + + _initialized = true; + _patienceSlider.enabled = false; } private void Update() { + if (!_initialized) return; + _currentOrderType = _subsystem.GetInteractionSubsystemType(); + if (!_targetOrderType.Contains(_currentOrderType)) + { + _patienceSlider.enabled = false; + return; + } + + if (_currentOrderType != _prevOrderType) + { + SetPatience(); + } + + _patienceSlider.value = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.RemainingPatienceTime); + if (_patienceSlider.value <= 0) + { + _patienceSlider.enabled = false; + } + } + + private void SetPatience() + { + _prevOrderType = _currentOrderType; + _patienceSlider.maxValue = _blackboard.GetBlackboardValue(RestaurantCustomerBlackboardKey.MaxPatienceTime); + _patienceSlider.value = _patienceSlider.maxValue; + _patienceSlider.enabled = true; } } } \ No newline at end of file