From e0e0f3564ffa85416c1974a2b17d873a6080158e Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 20 Aug 2025 12:59:29 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=EC=B2=B4=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InteractionExecutionParameters, InteractionDisplayParamaters --- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 36 ++++++++++++++++--- .../RestaurantInteractionComponent.cs | 25 +++++++++---- 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index 49c62717e..52c19a0e1 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -4,14 +4,42 @@ namespace DDD { + /* TODO : BitFlag 제거해야할듯. + 인터랙션 개수가 엄청나게 많아질것으로 예상됨. + 혹은 인터랙션 타입을 여기서 추가하면 안 되고 여기는 몇가지 정적인 타입만 두고 RestaurantInteraction 같은 식으로 확장해서 사용해야함. + 확장성을 생각하면 RestaurantInteractionSolver에서 RestaurantInteractionType을 리졸브해서 또 다른 Solver로 포워딩하는 식으로. + 편하게 하려면 그냥 여기서 비트연산자 없애고 인터랙션타입을 무한정 늘리기. + */ [Flags] - public enum InteractionType : uint + public enum InteractionType : ulong { None = 0u, RestaurantManagementUi = 1u << 0, OpenRestaurant = 1u << 1, All = 0xFFFFFFFFu } + + [System.Serializable] + public struct InteractionExecutionParameters + { + [SerializeField] private float _holdTime; + public float HoldTime => _holdTime; + public InteractionExecutionParameters(float holdTime = 1f) + { + _holdTime = holdTime; + } + } + + [System.Serializable] + public struct InteractionDisplayParameters + { + [SerializeField] private string _messageKey; + public string MessageKey => _messageKey; + public InteractionDisplayParameters(string messageKey = "") + { + _messageKey = messageKey; + } + } public interface IInteractable { @@ -21,10 +49,8 @@ public interface IInteractable InteractionType GetInteractionType(); GameObject GetInteractableGameObject(); void InitializeInteraction(InteractionType interactionType); - // TODO : Struct InteractionExecutionParameters 등으로 정리 - float GetRequiredHoldTime(); - // TODO : Struct InteractionDisplayParameters 등으로 정리 - string GetInteractionMessageKey(); + InteractionExecutionParameters GetExecutionParameters(); + InteractionDisplayParameters GetDisplayParameters(); Vector3[] GetInteractionPoints(); } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 766b67be8..fcd7860d7 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -2,12 +2,12 @@ namespace DDD { + public class RestaurantInteractionComponent : MonoBehaviour, IInteractable { - [SerializeField] private InteractionType _interactionType = InteractionType.None; - [SerializeField] private float _holdTime = 1f; - [SerializeField] private string _interactionMessageKey = ""; - + [SerializeField] protected InteractionType _interactionType = InteractionType.None; + [SerializeField] protected InteractionExecutionParameters _executionParameters = new InteractionExecutionParameters(1f); + [SerializeField] protected InteractionDisplayParameters _displayParameters = new InteractionDisplayParameters(""); [SerializeField] protected GameFlowState _interactionAvailableFlows; [SerializeField] private Transform[] _aiInteractionPoints; @@ -49,21 +49,32 @@ public void InitializeInteraction(InteractionType interactionType) _interactionType = interactionType; } + // 새로운 스트럭트 기반 메서드들 + public InteractionExecutionParameters GetExecutionParameters() + { + return _executionParameters; + } + + public InteractionDisplayParameters GetDisplayParameters() + { + return _displayParameters; + } + + // 하위 호환성을 위한 기존 메서드들 public float GetRequiredHoldTime() { - return _holdTime; + return _executionParameters.HoldTime; } public string GetInteractionMessageKey() { - return _interactionMessageKey; + return _displayParameters.MessageKey; } public Vector3[] GetInteractionPoints() { if (_aiInteractionPoints == null || _aiInteractionPoints.Length == 0) { - // AI 상호작용 포인트가 설정되지 않은 경우 오브젝트의 위치를 기본값으로 반환 return new Vector3[] { transform.position }; } From 75bc5e52cc2fa92149995ec6ef7809ce7d10df2c Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 20 Aug 2025 12:59:43 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic.meta | 3 +++ .../RestaurantEvent/{ => Cosmetic}/InteractableHighlight.cs | 0 .../{ => Cosmetic}/InteractableHighlight.cs.meta | 0 3 files changed, 3 insertions(+) create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic.meta rename Assets/_DDD/_Scripts/RestaurantEvent/{ => Cosmetic}/InteractableHighlight.cs (100%) rename Assets/_DDD/_Scripts/RestaurantEvent/{ => Cosmetic}/InteractableHighlight.cs.meta (100%) diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic.meta new file mode 100644 index 000000000..7a4acd006 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 59f8f35926714893bb8d4192e527fa48 +timeCreated: 1755655771 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic/InteractableHighlight.cs similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs rename to Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic/InteractableHighlight.cs diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic/InteractableHighlight.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEvent/InteractableHighlight.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEvent/Cosmetic/InteractableHighlight.cs.meta From c7a4aee67da093c2d6d8b0c48326bcc0f4cbd5e0 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 20 Aug 2025 14:07:33 +0900 Subject: [PATCH 3/8] =?UTF-8?q?WIP=20:=20=EC=9D=B8=ED=84=B0=EB=9E=99?= =?UTF-8?q?=EC=85=98=20=EC=84=9C=EB=B8=8C=EC=8B=9C=EC=8A=A4=ED=85=9C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 10 +-- .../GameEvent/InteractionSubsystem.cs | 4 + .../GameEvent/InteractionSubsystem.cs.meta | 3 + .../Core/RestaurantCharacterInteraction.cs | 2 +- .../Player/RestaurantPlayerInteraction.cs | 4 +- .../RestaurantEnvironment/Interactions.meta | 3 + .../RestaurantOrderInteraction.cs | 76 +++++++++++++++++++ .../RestaurantOrderInteraction.cs.meta | 3 + .../RestaurantInteractionEvents.cs | 3 +- .../Solvers/RestaurantOrderSolver.cs | 35 +++++++++ .../Solvers/RestaurantOrderSolver.cs.meta | 3 + 11 files changed, 135 insertions(+), 11 deletions(-) create mode 100644 Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs create mode 100644 Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index 52c19a0e1..c52bd47fd 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -4,18 +4,14 @@ namespace DDD { - /* TODO : BitFlag 제거해야할듯. - 인터랙션 개수가 엄청나게 많아질것으로 예상됨. - 혹은 인터랙션 타입을 여기서 추가하면 안 되고 여기는 몇가지 정적인 타입만 두고 RestaurantInteraction 같은 식으로 확장해서 사용해야함. - 확장성을 생각하면 RestaurantInteractionSolver에서 RestaurantInteractionType을 리졸브해서 또 다른 Solver로 포워딩하는 식으로. - 편하게 하려면 그냥 여기서 비트연산자 없애고 인터랙션타입을 무한정 늘리기. - */ [Flags] - public enum InteractionType : ulong + public enum InteractionType : uint { None = 0u, RestaurantManagementUi = 1u << 0, OpenRestaurant = 1u << 1, + RestaurantOrder = 1u << 2, + RestaurantMeal = 1u << 3, All = 0xFFFFFFFFu } diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs new file mode 100644 index 000000000..8ca5eefc8 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -0,0 +1,4 @@ +namespace DDD +{ + +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs.meta b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs.meta new file mode 100644 index 000000000..1bea8095d --- /dev/null +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2e8dca10c7c74466bd1df632b7d111c4 +timeCreated: 1755665098 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs index 2ca1f4021..c4745fafd 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs @@ -44,7 +44,7 @@ protected virtual void Update() _interactHeldTime += Time.deltaTime; - float requiredHoldTime = _interactingTarget.GetRequiredHoldTime(); + float requiredHoldTime = _interactingTarget.GetExecutionParameters().HoldTime; float ratio = Mathf.Clamp01(_interactHeldTime / requiredHoldTime); if (_interactHeldTime >= requiredHoldTime) diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerInteraction.cs index 8f648cef9..a86e19447 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerInteraction.cs @@ -49,7 +49,7 @@ private void OnInteractPerformed(InputAction.CallbackContext context) { if (_nearestInteractable == null || CanInteractTo(_nearestInteractable) == false) return; - float requiredHoldTime = _nearestInteractable.GetRequiredHoldTime(); + float requiredHoldTime = _nearestInteractable.GetExecutionParameters().HoldTime; if (requiredHoldTime <= 0f) { @@ -98,7 +98,7 @@ private void BroadcastShowUi(IInteractable interactable, bool canInteract, float { var evt = GameEvents.ShowInteractionUiEvent; evt.CanInteract = canInteract; - evt.TextKey = interactable.GetInteractionMessageKey(); + evt.TextKey = interactable.GetDisplayParameters().MessageKey; evt.HoldProgress = ratio; EventBus.Broadcast(evt); } diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions.meta new file mode 100644 index 000000000..52a559f1d --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 30a19025059e4338b29bf140644dd5aa +timeCreated: 1755655803 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs new file mode 100644 index 000000000..8c3ca91c1 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs @@ -0,0 +1,76 @@ +using System; +using UnityEngine; + +namespace DDD +{ + public interface IInteractionSubsystemObject where T : Enum + { + T GetInteractionSubsystemType(); + } + public interface IInteractionSubsystemSolver where T : Enum + { + bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); + bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null); + } + + public interface IInteractionSubsystemSubject where T : Enum + { + bool CanSolveInteractionType(T interactionSubsystemType); + bool CanInteractTo(IInteractionSubsystemObject interactableSubsystemObject, + ScriptableObject payloadSo = null); + } + + [Flags] + public enum RestaurantOrderInteractionType : uint + { + // None = 0u, + WaitCustomer = 1u << 0, + // WaitOrder = 1u << 1, + // WaitServe = 1u << 2, + // All = 0xFFFFFFFFu + } + public class RestaurantOrderInteraction : RestaurantInteractionComponent, IInteractionSubsystemObject + { + [SerializeField] protected RestaurantOrderInteractionType _initialOrderInteractionType = RestaurantOrderInteractionType.WaitCustomer; + private RestaurantOrderInteractionType _currentRestaurantOrderInteractionType; + + // EDITOR + private void Reset() + { + SetInteractionTypeToRestaurantOrder(); + } + private void OnValidate() + { + SetInteractionTypeToRestaurantOrder(); + } + // ~EDITOR + + private void Start() + { + + } + + private void SetInteractionTypeToRestaurantOrder() + { + _interactionType = InteractionType.RestaurantOrder; + } + InteractionType GetInteractionType() + { + return InteractionType.RestaurantOrder; + } + bool CanInteract() + { + return TODO_IMPLEMENT_ME; + } + bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); + void InitializeInteraction(InteractionType interactionType); + InteractionExecutionParameters GetExecutionParameters(); + InteractionDisplayParameters GetDisplayParameters(); + + public RestaurantOrderInteractionType GetInteractionSubsystemType() + { + return _currentRestaurantOrderInteractionType; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta new file mode 100644 index 000000000..97b6c0b9a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c0b1e0992510498b8d33d5b6094b8f4b +timeCreated: 1755655843 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs index 2f86f12c3..6d9021765 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs @@ -14,7 +14,8 @@ public static class RestaurantInteractionEventSolvers public static Dictionary TypeToSolver = new() { {InteractionType.RestaurantManagementUi, typeof(RestaurantManagementUiEventSolver)}, - {InteractionType.OpenRestaurant, typeof(RestaurantOpenEventSolver)} + {InteractionType.OpenRestaurant, typeof(RestaurantOpenEventSolver)}, + {InteractionType.RestaurantOrder, typeof(RestaurantOrderSolver)} }; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs new file mode 100644 index 000000000..653b7e355 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +namespace DDD +{ + public class RestaurantOrderSolver : MonoBehaviour, IInteractionSolver, IInteractionSubsystemSolver + { + public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + return ExecuteInteractionSubsystem(interactor, interactable, payloadSo); + } + + public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); + } + + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + TODO_IMPLEMENT_ME + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + if (interactable is IInteractionSubsystemObject subsystem) + { + RestaurantOrderInteractionType interactionType = subsystem.GetInteractionSubsystemType(); + // Can I solve this interaction type? + TODO_IMPLEMENT_ME + } + return false; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta new file mode 100644 index 000000000..0d072c20a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b832b16fa5964817afa836bc86f25f6b +timeCreated: 1755664610 \ No newline at end of file From 4c7d9c17e694c4bd6f7c52f07b3948f547ed2d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Wed, 20 Aug 2025 15:30:08 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=EC=9D=B8=ED=84=B0=EB=A0=89=EC=85=98=20?= =?UTF-8?q?=EC=84=9C=EB=B8=8C=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EC=B4=88?= =?UTF-8?q?=EC=95=88=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Props/Prop_CustomerTable.prefab | 276 +++++++++++++++++- .../Prop/Brazier1/Mat_Brazier1.mat | 2 +- .../Prop/Brazier2/Mat_Brazier2.mat | 2 +- .../Prop/Brazier3/Mat_Brazier3.mat | 2 +- .../Prop/Brazier4/Mat_Brazier4.mat | 2 +- .../Prop/DreamSeaweed/Mat_DreamSeaweed.mat | 2 +- .../Environments/Prop/Duck/Mat_Duck.mat | 2 +- .../Environments/Prop/Fried/Mat_Fried.mat | 2 +- .../Environments/Prop/Fried2/Mat_Fried2.mat | 2 +- .../Environments/Prop/Fried3/Mat_Fried3.mat | 2 +- .../Environments/Prop/Fried4/Mat_Fried4.mat | 2 +- .../Environments/Prop/Pot1/Mat_Pot1.mat | 2 +- .../Environments/Prop/Pot2/Mat_Pot2.mat | 2 +- .../Environments/Prop/Pot3/Mat_Pot3.mat | 2 +- .../Environments/Prop/Pot4/Mat_Pot4.mat | 2 +- .../Prefabs/RestaurantPlayer.prefab | 2 +- .../GameEvent/InteractionSubsystem.cs | 14 +- .../RestaurantManagementInteraction.cs | 16 + .../RestaurantManagementInteraction.cs.meta | 3 + .../RestaurantOrderInteraction.cs | 57 ++-- .../RestaurantInteractionComponent.cs | 14 +- .../Solvers/RestaurantOrderSolver.cs | 17 +- ProjectSettings/EditorBuildSettings.asset | 2 +- ProjectSettings/EntitiesClientSettings.asset | 3 + 24 files changed, 378 insertions(+), 54 deletions(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta create mode 100644 ProjectSettings/EntitiesClientSettings.asset diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab index f05b17a99..7d256654c 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab @@ -99,5 +99,279 @@ PrefabInstance: m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 8605899758048842936} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 6282952769554945552} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 4598203232635129220} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} +--- !u!1 &9211739394093953175 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + m_PrefabInstance: {fileID: 4777358697124966162} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8605899758048842936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9211739394093953175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c0b1e0992510498b8d33d5b6094b8f4b, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 4 + _executionParameters: + _holdTime: 1 + _displayParameters: + _messageKey: + _interactionAvailableFlows: 1 + _aiInteractionPoints: [] + _initialOrderInteractionType: 0 +--- !u!114 &6282952769554945552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9211739394093953175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} + m_Name: + m_EditorClassIdentifier: + profile: {fileID: 0} + profileSync: 0 + camerasLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + effectGroup: 0 + effectTarget: {fileID: 0} + effectGroupLayer: + serializedVersion: 2 + m_Bits: 4294967295 + effectNameFilter: + effectNameUseRegEx: 0 + combineMeshes: 0 + alphaCutOff: 0 + cullBackFaces: 1 + padding: 0 + ignoreObjectVisibility: 0 + reflectionProbes: 0 + GPUInstancing: 1 + sortingPriority: 0 + optimizeSkinnedMesh: 1 + depthClip: 0 + cameraDistanceFade: 0 + cameraDistanceFadeNear: 0 + cameraDistanceFadeFar: 1000 + normalsOption: 0 + ignore: 0 + _highlighted: 0 + fadeInDuration: 0 + fadeOutDuration: 0 + flipY: 0 + constantWidth: 1 + extraCoveragePixels: 0 + minimumWidth: 0 + subMeshMask: -1 + overlay: 0 + overlayMode: 0 + overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + overlayAnimationSpeed: 1 + overlayMinIntensity: 0.5 + overlayBlending: 1 + overlayTexture: {fileID: 0} + overlayTextureUVSpace: 0 + overlayTextureScale: 1 + overlayTextureScrolling: {x: 0, y: 0} + overlayVisibility: 0 + outline: 1 + outlineColor: {r: 0, g: 0, b: 0, a: 1} + outlineColorStyle: 0 + outlineGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + outlineGradientInLocalSpace: 0 + outlineWidth: 0.45 + outlineBlurPasses: 2 + outlineQuality: 3 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineSharpness: 1 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 0 + outlineContourStyle: 0 + outlineMaskMode: 0 + glow: 0 + glowWidth: 0.4 + glowQuality: 3 + glowBlurMethod: 0 + glowDownsampling: 2 + glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} + glowDithering: 1 + glowDitheringStyle: 0 + glowMagicNumber1: 0.75 + glowMagicNumber2: 0.5 + glowAnimationSpeed: 1 + glowVisibility: 0 + glowBlitDebug: 0 + glowBlendPasses: 1 + glowPasses: + - offset: 4 + alpha: 0.1 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 3 + alpha: 0.2 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 2 + alpha: 0.3 + color: {r: 0.64, g: 1, b: 0, a: 1} + - offset: 1 + alpha: 0.4 + color: {r: 0.64, g: 1, b: 0, a: 1} + glowMaskMode: 0 + innerGlow: 0 + innerGlowWidth: 1 + innerGlowColor: {r: 1, g: 1, b: 1, a: 1} + innerGlowBlendMode: 0 + innerGlowVisibility: 0 + targetFX: 0 + targetFXTexture: {fileID: 0} + targetFXColor: {r: 1, g: 1, b: 1, a: 1} + targetFXCenter: {fileID: 0} + targetFXRotationSpeed: 50 + targetFXInitialScale: 4 + targetFXEndScale: 1.5 + targetFXScaleToRenderBounds: 1 + targetFXUseEnclosingBounds: 0 + targetFXAlignToGround: 0 + targetFXOffset: {x: 0, y: 0, z: 0} + targetFXFadePower: 32 + targetFXGroundMaxDistance: 10 + targetFXGroundLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + targetFXTransitionDuration: 0.5 + targetFXStayDuration: 1.5 + targetFXVisibility: 1 + iconFX: 0 + iconFXMesh: {fileID: 0} + iconFXLightColor: {r: 1, g: 1, b: 1, a: 1} + iconFXDarkColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + iconFXCenter: {fileID: 0} + iconFXRotationSpeed: 50 + iconFXAnimationOption: 0 + iconFXAnimationAmount: 0.1 + iconFXAnimationSpeed: 3 + iconFXScale: 1 + iconFXScaleToRenderBounds: 0 + iconFXOffset: {x: 0, y: 1, z: 0} + iconFXTransitionDuration: 0.5 + iconFXStayDuration: 1.5 + seeThrough: 2 + seeThroughOccluderMask: + serializedVersion: 2 + m_Bits: 4294967295 + seeThroughOccluderThreshold: 0.3 + seeThroughOccluderMaskAccurate: 0 + seeThroughOccluderCheckInterval: 1 + seeThroughOccluderCheckIndividualObjects: 0 + seeThroughDepthOffset: 0 + seeThroughMaxDepth: 0 + seeThroughIntensity: 0.8 + seeThroughTintAlpha: 0.5 + seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} + seeThroughNoise: 1 + seeThroughBorder: 0 + seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} + seeThroughBorderOnly: 0 + seeThroughBorderWidth: 0.45 + seeThroughOrdered: 0 + seeThroughTexture: {fileID: 0} + seeThroughTextureUVSpace: 0 + seeThroughTextureScale: 1 + seeThroughChildrenSortingMode: 0 + rmsCount: 1 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &4598203232635129220 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9211739394093953175} + 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 + Opacity: 1 + _focusedStyle: + Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} + Width: 1 + Opacity: 1 + _unavailableStyle: + Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + Width: 0.5 + Opacity: 1 + _objectiveStyle: + Color: {r: 0, g: 1, b: 1, a: 1} + Width: 1 + Opacity: 1 + _breathingSpeed: 2 + _breathingRange: 0.3 + _enableBreathingEffect: 1 + _alphaCutOff: 0.5 + _combineMeshes: 1 + _constantWidth: 1 + _outlineQuality: 2 + _outlineIndependent: 1 + _outlineBlurPasses: 1 + _outlineSharpness: 8 + _currentOutlineType: 0 + _currentOpacityMultiplier: 1 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Mat_Brazier1.mat b/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Mat_Brazier1.mat index 647d83081..29c00b75b 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Mat_Brazier1.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Mat_Brazier1.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Brazier2/Mat_Brazier2.mat b/Assets/_DDD/_Addressables/Environments/Prop/Brazier2/Mat_Brazier2.mat index f735857d9..f1003b969 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Brazier2/Mat_Brazier2.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Brazier2/Mat_Brazier2.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Brazier3/Mat_Brazier3.mat b/Assets/_DDD/_Addressables/Environments/Prop/Brazier3/Mat_Brazier3.mat index 3a2fe671b..b1f8866c3 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Brazier3/Mat_Brazier3.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Brazier3/Mat_Brazier3.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Brazier4/Mat_Brazier4.mat b/Assets/_DDD/_Addressables/Environments/Prop/Brazier4/Mat_Brazier4.mat index 9e3fd6944..e71a81b58 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Brazier4/Mat_Brazier4.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Brazier4/Mat_Brazier4.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/DreamSeaweed/Mat_DreamSeaweed.mat b/Assets/_DDD/_Addressables/Environments/Prop/DreamSeaweed/Mat_DreamSeaweed.mat index 8fefba955..31d7318e1 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/DreamSeaweed/Mat_DreamSeaweed.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/DreamSeaweed/Mat_DreamSeaweed.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Duck/Mat_Duck.mat b/Assets/_DDD/_Addressables/Environments/Prop/Duck/Mat_Duck.mat index b587b5c03..344e1affc 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Duck/Mat_Duck.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Duck/Mat_Duck.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Fried/Mat_Fried.mat b/Assets/_DDD/_Addressables/Environments/Prop/Fried/Mat_Fried.mat index 904a5d256..66faed0bf 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Fried/Mat_Fried.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Fried/Mat_Fried.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Fried2/Mat_Fried2.mat b/Assets/_DDD/_Addressables/Environments/Prop/Fried2/Mat_Fried2.mat index 6e519d0a6..2fec2d8ec 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Fried2/Mat_Fried2.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Fried2/Mat_Fried2.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Fried3/Mat_Fried3.mat b/Assets/_DDD/_Addressables/Environments/Prop/Fried3/Mat_Fried3.mat index 714898f02..ea91bd3db 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Fried3/Mat_Fried3.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Fried3/Mat_Fried3.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Fried4/Mat_Fried4.mat b/Assets/_DDD/_Addressables/Environments/Prop/Fried4/Mat_Fried4.mat index 74e4f7fc3..c73583cdb 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Fried4/Mat_Fried4.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Fried4/Mat_Fried4.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Mat_Pot1.mat b/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Mat_Pot1.mat index 8fdcb7a91..8b44fbd7f 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Mat_Pot1.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Mat_Pot1.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Pot2/Mat_Pot2.mat b/Assets/_DDD/_Addressables/Environments/Prop/Pot2/Mat_Pot2.mat index 53c7f07d6..0f4c37073 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Pot2/Mat_Pot2.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Pot2/Mat_Pot2.mat @@ -21,7 +21,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Pot3/Mat_Pot3.mat b/Assets/_DDD/_Addressables/Environments/Prop/Pot3/Mat_Pot3.mat index da3c48f99..742bb6d22 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Pot3/Mat_Pot3.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Pot3/Mat_Pot3.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Pot4/Mat_Pot4.mat b/Assets/_DDD/_Addressables/Environments/Prop/Pot4/Mat_Pot4.mat index 6bc0d0e21..9b2c73cc4 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Pot4/Mat_Pot4.mat +++ b/Assets/_DDD/_Addressables/Environments/Prop/Pot4/Mat_Pot4.mat @@ -34,7 +34,7 @@ Material: m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2450 stringTagMap: RenderType: TransparentCutout disabledShaderPasses: diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab index 92d5aded1..c1e3a3a75 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab @@ -423,7 +423,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3} m_Name: m_EditorClassIdentifier: - _interactionType: 4294967295 + _interactionType: 4294967287 _nearColliders: - {fileID: 0} - {fileID: 0} diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index 8ca5eefc8..c5b79395d 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -1,4 +1,16 @@ +using System; +using UnityEngine; + namespace DDD { - + public interface IInteractionSubsystemObject where T : Enum + { + T GetInteractionSubsystemType(); + } + public interface IInteractionSubsystemSolver where T : Enum + { + bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); + bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null); + } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs new file mode 100644 index 000000000..c2df3a351 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs @@ -0,0 +1,16 @@ +using System; + +namespace DDD +{ + [Flags] + public enum RestaurantManagementType : uint + { + OpenRestaurantMenu = 0, + StartRestaurant = 1, + } + + //public class RestaurantManagementInteraction : RestaurantInteractionComponent, IInteractionSubsystemObject + //{ + // + //} +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta new file mode 100644 index 000000000..2cf0b9e79 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1235f6bde9304d8f85079f2777bd4b3c +timeCreated: 1755671037 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs index 8c3ca91c1..d39dd3d8f 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs @@ -3,29 +3,12 @@ namespace DDD { - public interface IInteractionSubsystemObject where T : Enum - { - T GetInteractionSubsystemType(); - } - public interface IInteractionSubsystemSolver where T : Enum - { - bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); - bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null); - } - - public interface IInteractionSubsystemSubject where T : Enum - { - bool CanSolveInteractionType(T interactionSubsystemType); - bool CanInteractTo(IInteractionSubsystemObject interactableSubsystemObject, - ScriptableObject payloadSo = null); - } - [Flags] public enum RestaurantOrderInteractionType : uint { // None = 0u, - WaitCustomer = 1u << 0, + WaitCustomer = 0, + // WaitCustomer = 1u << 0, // WaitOrder = 1u << 1, // WaitServe = 1u << 2, // All = 0xFFFFFFFFu @@ -48,26 +31,46 @@ private void OnValidate() private void Start() { - + _currentRestaurantOrderInteractionType = _initialOrderInteractionType; } private void SetInteractionTypeToRestaurantOrder() { _interactionType = InteractionType.RestaurantOrder; } - InteractionType GetInteractionType() + public override InteractionType GetInteractionType() { return InteractionType.RestaurantOrder; } - bool CanInteract() + public override bool CanInteract() { - return TODO_IMPLEMENT_ME; + // 현재 RestaurantOrderInteractionType를 수행할 수 있는지? + if (GetInteractionSubsystemType() == RestaurantOrderInteractionType.WaitCustomer) + { + // Check WaitCustomer + return true; + } + + return false; } - bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); - void InitializeInteraction(InteractionType interactionType); - InteractionExecutionParameters GetExecutionParameters(); - InteractionDisplayParameters GetDisplayParameters(); + public override bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + { + // _currentRestaurantOrderInteractionType에 따라 동작이 달라지겠지 + if (GetInteractionSubsystemType() == RestaurantOrderInteractionType.WaitCustomer) + { + // DO WAIT CUSTOMER + } + return base.OnInteracted(interactor, payloadSo); + } + + public override void InitializeInteraction(InteractionType interactionType) + { + // RestaurantOrderInteractionType에 따른 동작들을 초기화 + // Initialize WaitCustomer actions + base.InitializeInteraction(interactionType); + } + public RestaurantOrderInteractionType GetInteractionSubsystemType() { return _currentRestaurantOrderInteractionType; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index fcd7860d7..d88aefe9c 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -11,19 +11,19 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable [SerializeField] protected GameFlowState _interactionAvailableFlows; [SerializeField] private Transform[] _aiInteractionPoints; - public bool CanInteract() + public virtual bool CanInteract() { return !IsInteractionHidden(); } - public bool IsInteractionHidden() + public virtual bool IsInteractionHidden() { var currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; var flowDisabled = (currentGameFlowState & _interactionAvailableFlows) == 0; return flowDisabled; } - public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { if (CanInteract() == false) { @@ -34,7 +34,7 @@ public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = nu return interactionResult; } - public InteractionType GetInteractionType() + public virtual InteractionType GetInteractionType() { return _interactionType; } @@ -44,18 +44,18 @@ public GameObject GetInteractableGameObject() return gameObject; } - public void InitializeInteraction(InteractionType interactionType) + public virtual void InitializeInteraction(InteractionType interactionType) { _interactionType = interactionType; } // 새로운 스트럭트 기반 메서드들 - public InteractionExecutionParameters GetExecutionParameters() + public virtual InteractionExecutionParameters GetExecutionParameters() { return _executionParameters; } - public InteractionDisplayParameters GetDisplayParameters() + public virtual InteractionDisplayParameters GetDisplayParameters() { return _displayParameters; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs index 653b7e355..3f8089dee 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -17,7 +17,17 @@ public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable i public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) { - TODO_IMPLEMENT_ME + if (interactable is IInteractionSubsystemObject subsystem) + { + RestaurantOrderInteractionType interactionType = subsystem.GetInteractionSubsystemType(); + // Can I solve this interaction type? + if (interactionType == RestaurantOrderInteractionType.WaitCustomer) + { + // DO SOMETHING!!! + return true; + } + } + return false; } public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, @@ -27,7 +37,10 @@ public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInter { RestaurantOrderInteractionType interactionType = subsystem.GetInteractionSubsystemType(); // Can I solve this interaction type? - TODO_IMPLEMENT_ME + if (interactionType == RestaurantOrderInteractionType.WaitCustomer) + { + return true; + } } return false; } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index ed8485fa0..6459f8e33 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f86abe14bf9fc4c7c93dfa96efd110ef0f56c3fb96a952c57e06a723fc87c352 +oid sha256:b8ae76b7c8f92890e759f46ff36b5db6b9e756533c8f14d3ef3ea41df7f4c5ad size 1075 diff --git a/ProjectSettings/EntitiesClientSettings.asset b/ProjectSettings/EntitiesClientSettings.asset new file mode 100644 index 000000000..5f47f97f5 --- /dev/null +++ b/ProjectSettings/EntitiesClientSettings.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0197d88686b9f0693f82b87bb787205373c1a8b7c6f1ff8d89d8ed61355369e8 +size 440 From a28415330c761fde12f7e75d9c0754ed41951967 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 20 Aug 2025 16:50:29 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20?= =?UTF-8?q?=EC=98=A4=EB=8D=94=20=EC=83=81=ED=98=B8=EC=9E=91=EC=9A=A9=20?= =?UTF-8?q?=EC=84=9C=EB=B8=8C=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EB=8F=84?= =?UTF-8?q?=EC=9E=85=20=EB=B0=8F=20=EC=A3=BC=EB=AC=B8/=EC=84=9C=EB=B9=99?= =?UTF-8?q?=20=EC=86=94=EB=B2=84=20=EC=B6=94=EA=B0=80,=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=83=81=ED=98=B8=EC=9E=91=EC=9A=A9/=EC=BA=90?= =?UTF-8?q?=EB=A6=AD=ED=84=B0=20=EB=A1=9C=EC=A7=81=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameEvent/InteractionSubsystem.cs | 15 +++- .../Core/RestaurantCharacter.cs | 2 +- .../Core/RestaurantCharacterInteraction.cs | 4 +- .../RestaurantOrderInteraction.cs | 79 ------------------- .../RestaurantOrderInteractionSubsystem.cs | 59 ++++++++++++++ ...staurantOrderInteractionSubsystem.cs.meta} | 0 .../RestaurantInteractionComponent.cs | 65 ++++++++++++++- .../Solvers/RestaurantOrderSolver.cs | 68 +++++++++------- .../Solvers/RestaurantOrders.meta | 3 + .../RestaurantOrderSolver_Order.cs | 19 +++++ .../RestaurantOrderSolver_Order.cs.meta | 3 + .../RestaurantOrderSolver_Serve.cs | 19 +++++ .../RestaurantOrderSolver_Serve.cs.meta | 3 + .../RestaurantOrderSolver_Wait.cs | 19 +++++ .../RestaurantOrderSolver_Wait.cs.meta | 3 + 15 files changed, 245 insertions(+), 116 deletions(-) delete mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs rename Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/{RestaurantOrderInteraction.cs.meta => RestaurantOrderInteractionSubsystem.cs.meta} (100%) create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs.meta diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index c5b79395d..1085117d3 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -3,11 +3,22 @@ namespace DDD { - public interface IInteractionSubsystemObject where T : Enum + public interface IInteractionSubsystemObject + { + Type GetSubsystemEnumType(); + void InitializeSubsystem(); + bool CanInteract(); + bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); + } + public interface IInteractionSubsystemObject : IInteractionSubsystemObject where T : Enum { T GetInteractionSubsystemType(); } - public interface IInteractionSubsystemSolver where T : Enum + + public interface IInteractionSubsystemSolver + { + } + public interface IInteractionSubsystemSolver : IInteractionSubsystemSolver where T : Enum { bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs index 0772089b6..45c56de5d 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs @@ -23,7 +23,7 @@ protected virtual void Start() var flag = typeToSolver.Key; if (flag == InteractionType.None) continue; - if ((_interactionComponent.InteractionType & flag) == 0) continue; + if ((_interactionComponent.AvailableInteractions & flag) == 0) continue; if (!TryGetComponent(typeToSolver.Value, out _)) { diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs index c4745fafd..3db7a4412 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs @@ -6,10 +6,10 @@ namespace DDD { public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler { - [EnumToggleButtons, SerializeField] protected InteractionType _interactionType; + [EnumToggleButtons, SerializeField] protected InteractionType _availableInteractions; [SerializeField, ReadOnly] protected Collider[] _nearColliders = new Collider[10]; - public InteractionType InteractionType => _interactionType; + public InteractionType AvailableInteractions => _availableInteractions; protected IInteractable _nearestInteractable; protected IInteractable _previousInteractable; diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs deleted file mode 100644 index d39dd3d8f..000000000 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using UnityEngine; - -namespace DDD -{ - [Flags] - public enum RestaurantOrderInteractionType : uint - { - // None = 0u, - WaitCustomer = 0, - // WaitCustomer = 1u << 0, - // WaitOrder = 1u << 1, - // WaitServe = 1u << 2, - // All = 0xFFFFFFFFu - } - public class RestaurantOrderInteraction : RestaurantInteractionComponent, IInteractionSubsystemObject - { - [SerializeField] protected RestaurantOrderInteractionType _initialOrderInteractionType = RestaurantOrderInteractionType.WaitCustomer; - private RestaurantOrderInteractionType _currentRestaurantOrderInteractionType; - - // EDITOR - private void Reset() - { - SetInteractionTypeToRestaurantOrder(); - } - private void OnValidate() - { - SetInteractionTypeToRestaurantOrder(); - } - // ~EDITOR - - private void Start() - { - _currentRestaurantOrderInteractionType = _initialOrderInteractionType; - } - - private void SetInteractionTypeToRestaurantOrder() - { - _interactionType = InteractionType.RestaurantOrder; - } - public override InteractionType GetInteractionType() - { - return InteractionType.RestaurantOrder; - } - public override bool CanInteract() - { - // 현재 RestaurantOrderInteractionType를 수행할 수 있는지? - if (GetInteractionSubsystemType() == RestaurantOrderInteractionType.WaitCustomer) - { - // Check WaitCustomer - return true; - } - - return false; - } - - public override bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) - { - // _currentRestaurantOrderInteractionType에 따라 동작이 달라지겠지 - if (GetInteractionSubsystemType() == RestaurantOrderInteractionType.WaitCustomer) - { - // DO WAIT CUSTOMER - } - return base.OnInteracted(interactor, payloadSo); - } - - public override void InitializeInteraction(InteractionType interactionType) - { - // RestaurantOrderInteractionType에 따른 동작들을 초기화 - // Initialize WaitCustomer actions - base.InitializeInteraction(interactionType); - } - - public RestaurantOrderInteractionType GetInteractionSubsystemType() - { - return _currentRestaurantOrderInteractionType; - } - } -} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs new file mode 100644 index 000000000..40b619387 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace DDD +{ + [Flags] + public enum RestaurantOrderType : uint + { + Wait = 0, + Order = 1u << 0, + Serve = 1u << 1, + } + + public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject + { + [SerializeField] protected RestaurantOrderType orderType = RestaurantOrderType.Wait; + private RestaurantOrderType currentRestaurantOrderType; + + public Type GetSubsystemEnumType() => typeof(RestaurantOrderType); + + private void Start() + { + currentRestaurantOrderType = orderType; + } + + public bool CanInteract() + { + // 현재 RestaurantOrderInteractionType를 수행할 수 있는지? + if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) + { + Debug.Assert(false); // TODO + // Check WaitCustomer + return true; + } + return false; + } + + public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + { + // _currentRestaurantOrderInteractionType에 따라 동작이 달라지겠지 + if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) + { + // DO WAIT CUSTOMER + } + + return true; + } + + public void InitializeSubsystem() + { + + } + + public RestaurantOrderType GetInteractionSubsystemType() + { + return currentRestaurantOrderType; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteraction.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index d88aefe9c..72090e59d 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -1,19 +1,49 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; using UnityEngine; +using Sirenix.OdinInspector; namespace DDD { + public static class RestaurantInteractionSubsystems + { + public static Dictionary TypeToSubsystem = new() + { + {InteractionType.RestaurantOrder, typeof(RestaurantOrderInteractionSubsystem)} + }; + } + public class RestaurantInteractionComponent : MonoBehaviour, IInteractable { + // Single interaction type + [ValueDropdown("GetAllInteractionTypes")] [SerializeField] protected InteractionType _interactionType = InteractionType.None; [SerializeField] protected InteractionExecutionParameters _executionParameters = new InteractionExecutionParameters(1f); [SerializeField] protected InteractionDisplayParameters _displayParameters = new InteractionDisplayParameters(""); [SerializeField] protected GameFlowState _interactionAvailableFlows; [SerializeField] private Transform[] _aiInteractionPoints; - + + private Dictionary _subsystems = new(); + + private static IEnumerable GetAllInteractionTypes() + { + return System.Enum.GetValues(typeof(InteractionType)) + .Cast() + .Where(x => x != InteractionType.All); // All은 제외 + } + public virtual bool CanInteract() { - return !IsInteractionHidden(); + bool isInteractionVisible = !IsInteractionHidden(); + bool hasValidSubsystem = true; + if (HasSubsystem(_interactionType)) + { + hasValidSubsystem = GetSubsystem(_interactionType).CanInteract(); + } + return isInteractionVisible && hasValidSubsystem; } public virtual bool IsInteractionHidden() @@ -31,6 +61,10 @@ public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloa } bool interactionResult = RestaurantInteractionEvents.RestaurantInteraction.RequestInteraction(interactor.GetInteractorGameObject(), GetInteractableGameObject(), GetInteractionType(), payloadSo, true); + if (HasSubsystem(_interactionType)) + { + interactionResult &= GetSubsystem(_interactionType).OnInteracted(interactor, payloadSo); + } return interactionResult; } @@ -47,6 +81,33 @@ public GameObject GetInteractableGameObject() public virtual void InitializeInteraction(InteractionType interactionType) { _interactionType = interactionType; + + InitializeSubsystems(); + } + + private void InitializeSubsystems() + { + // Initialize Interaction Subsystems + bool hasSubsystemType = RestaurantInteractionSubsystems.TypeToSubsystem.TryGetValue(_interactionType, out var subsystemType); + if (!hasSubsystemType) return; + + var subsystem = gameObject.GetComponent(subsystemType) as IInteractionSubsystemObject; + if (subsystem == null) + { + subsystem = gameObject.AddComponent(subsystemType) as IInteractionSubsystemObject; + } + _subsystems.Add(_interactionType, subsystem); + subsystem?.InitializeSubsystem(); + } + + private bool HasSubsystem(InteractionType interactionType) + { + return _subsystems.ContainsKey(interactionType); + } + + private IInteractionSubsystemObject GetSubsystem(InteractionType interactionType) + { + return _subsystems.GetValueOrDefault(interactionType) as IInteractionSubsystemObject; } // 새로운 스트럭트 기반 메서드들 diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs index 3f8089dee..38bfe2d87 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -1,48 +1,56 @@ +using System; +using System.Collections.Generic; +using DDD.RestaurantOrders; using UnityEngine; namespace DDD { - public class RestaurantOrderSolver : MonoBehaviour, IInteractionSolver, IInteractionSubsystemSolver + public static class RestaurantOrderSolvers { + public static Dictionary TypeToOrderSolver = new() + { + { RestaurantOrderType.Wait, typeof(RestaurantOrderSolver_Wait) }, + { RestaurantOrderType.Order, typeof(RestaurantOrderSolver_Order) }, + { RestaurantOrderType.Serve, typeof(RestaurantOrderSolver_Serve) } + }; + } + + public class RestaurantOrderSolver : MonoBehaviour, IInteractionSolver + { + private Dictionary> _solvers = new(); + + private void Start() + { + foreach (var orderSolver in RestaurantOrderSolvers.TypeToOrderSolver) + { + var solver = (IInteractionSubsystemSolver)gameObject.AddComponent(orderSolver.Value); + _solvers.Add(orderSolver.Key, solver); + } + } + public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) { - return ExecuteInteractionSubsystem(interactor, interactable, payloadSo); + return TryGetSolver(interactable, out var solver) && + solver.ExecuteInteractionSubsystem(interactor, interactable, payloadSo); } public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payloadSo = null) { - return CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); + return TryGetSolver(interactable, out var solver) && + solver.CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); } - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + // Solver를 가져오는 공통 로직 + private bool TryGetSolver(IInteractable interactable, out IInteractionSubsystemSolver solver) { - if (interactable is IInteractionSubsystemObject subsystem) - { - RestaurantOrderInteractionType interactionType = subsystem.GetInteractionSubsystemType(); - // Can I solve this interaction type? - if (interactionType == RestaurantOrderInteractionType.WaitCustomer) - { - // DO SOMETHING!!! - return true; - } - } - return false; - } - - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) - { - if (interactable is IInteractionSubsystemObject subsystem) - { - RestaurantOrderInteractionType interactionType = subsystem.GetInteractionSubsystemType(); - // Can I solve this interaction type? - if (interactionType == RestaurantOrderInteractionType.WaitCustomer) - { - return true; - } - } - return false; + solver = null; + + if (interactable is not IInteractionSubsystemObject subsystem) + return false; + + var type = subsystem.GetInteractionSubsystemType(); + return _solvers.TryGetValue(type, out solver); } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders.meta new file mode 100644 index 000000000..9518f5240 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0a7eea23af674c2aa6ffc20bd5801efb +timeCreated: 1755672003 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs new file mode 100644 index 000000000..edee1940d --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Order : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs.meta new file mode 100644 index 000000000..a47a2ccd0 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3afc1759b02e4230967b3b72fe354ea3 +timeCreated: 1755672492 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs new file mode 100644 index 000000000..263c65494 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Serve : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs.meta new file mode 100644 index 000000000..3186c427f --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4df15c40347044648623d5932bb0724e +timeCreated: 1755672501 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs new file mode 100644 index 000000000..14f6f77d9 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs.meta new file mode 100644 index 000000000..3e85dc4c2 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cc81a22ff98a4b42b45ad27219ec05fa +timeCreated: 1755672371 \ No newline at end of file From f895464e22ebfe70eb88d4887e07fdd4cb56cdfb Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 20 Aug 2025 18:42:07 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=EC=BB=A4=EC=8A=A4=ED=84=B0=EB=A8=B8=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=EC=97=90=20=EB=A0=88=EC=8A=A4?= =?UTF-8?q?=ED=86=A0=EB=9E=91=20=EC=98=A4=EB=8D=94=20=EC=9D=B8=ED=84=B0?= =?UTF-8?q?=EB=9E=99=EC=85=98=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Environments/Interactables/Common.meta | 8 + .../Common/RestaurantOrder.prefab | 156 ++++++++ .../Common/RestaurantOrder.prefab.meta | 7 + .../CustomerTable.meta | 0 .../CustomerTable/CustomerTable.mat | 0 .../CustomerTable/CustomerTable.mat.meta | 0 .../CustomerTable/CustomerTable.png | 0 .../CustomerTable/CustomerTable.png.meta | 0 .../Interactables/Prop_CustomerTable.prefab | 238 +++++++++++ .../Prop_CustomerTable.prefab.meta | 0 .../Props/Prop_CustomerTable.prefab | 377 ------------------ .../_DDD/_Scripts/GameEvent/IInteractable.cs | 2 +- .../RestaurantOrderInteractionSubsystem.cs | 13 +- .../Solvers/RestaurantOrderSolver.cs | 1 + .../RestaurantOrderSolver_Reserved.cs | 19 + .../RestaurantOrderSolver_Reserved.cs.meta | 3 + 16 files changed, 438 insertions(+), 386 deletions(-) create mode 100644 Assets/_DDD/Restaurant/Environments/Interactables/Common.meta create mode 100644 Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab create mode 100644 Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab.meta rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/CustomerTable.meta (100%) rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/CustomerTable/CustomerTable.mat (100%) rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/CustomerTable/CustomerTable.mat.meta (100%) rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/CustomerTable/CustomerTable.png (100%) rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/CustomerTable/CustomerTable.png.meta (100%) create mode 100644 Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab rename Assets/_DDD/Restaurant/Environments/{Props => Interactables}/Prop_CustomerTable.prefab.meta (100%) delete mode 100644 Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs.meta diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common.meta b/Assets/_DDD/Restaurant/Environments/Interactables/Common.meta new file mode 100644 index 000000000..56795ff88 --- /dev/null +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b8b2fde5b3b345e292e0b6b951a4abd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab new file mode 100644 index 000000000..24036b0a6 --- /dev/null +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -0,0 +1,156 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3857692527302447930 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1664322405549350652} + - component: {fileID: 8522104897182006738} + m_Layer: 0 + m_Name: InteractionPoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1664322405549350652 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + 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_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + 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 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3697702677815423220} + - component: {fileID: 3591347921553422000} + - component: {fileID: 4456475204957017828} + m_Layer: 7 + m_Name: RestaurantOrder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3697702677815423220 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + serializedVersion: 2 + 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: 1664322405549350652} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3591347921553422000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 4 + _executionParameters: + _holdTime: 0 + _displayParameters: + _messageKey: + _interactionAvailableFlows: 2 + _aiInteractionPoints: + - {fileID: 1664322405549350652} +--- !u!114 &4456475204957017828 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4103096974375017811} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c0b1e0992510498b8d33d5b6094b8f4b, type: 3} + m_Name: + m_EditorClassIdentifier: + orderType: 0 diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab.meta b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab.meta new file mode 100644 index 000000000..f06bbbf9f --- /dev/null +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2bbe3f26765344e6097aa9fd0f020fbf +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/Restaurant/Environments/Props/CustomerTable.meta b/Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable.meta similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/CustomerTable.meta rename to Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.mat b/Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.mat similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.mat rename to Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.mat diff --git a/Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.mat.meta b/Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.mat.meta similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.mat.meta rename to Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.mat.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.png b/Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.png similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.png rename to Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.png diff --git a/Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.png.meta b/Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.png.meta similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/CustomerTable/CustomerTable.png.meta rename to Assets/_DDD/Restaurant/Environments/Interactables/CustomerTable/CustomerTable.png.meta diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab new file mode 100644 index 000000000..718e7e94e --- /dev/null +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab @@ -0,0 +1,238 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &2565741073186224478 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8881739536043914635} + m_Modifications: + - 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 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4103096974375017811, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Name + value: RestaurantOrder_001 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} +--- !u!4 &1210262234305268138 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + m_PrefabInstance: {fileID: 2565741073186224478} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &4510296826299878002 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8881739536043914635} + m_Modifications: + - 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 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalPosition.z + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4103096974375017811, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + propertyPath: m_Name + value: RestaurantOrder + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} +--- !u!4 &992810551159552646 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3697702677815423220, guid: 2bbe3f26765344e6097aa9fd0f020fbf, type: 3} + m_PrefabInstance: {fileID: 4510296826299878002} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &4777358697124966162 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalScale.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalScale.y + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalScale.z + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_ConstrainProportionsScale + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_Name + value: Prop_CustomerTable + objectReference: {fileID: 0} + - target: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7856941568993672895, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8282162905857597943, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_StaticEditorFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8467019391491472137, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: 2100000, guid: 56d0a02ae31152e45ba2da46f7694378, type: 2} + - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_Size.x + value: 0.93 + objectReference: {fileID: 0} + - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_Size.z + value: 0.31 + objectReference: {fileID: 0} + - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + propertyPath: m_Center.z + value: 0.14 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 992810551159552646} + - targetCorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 1210262234305268138} + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} +--- !u!4 &8881739536043914635 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + m_PrefabInstance: {fileID: 4777358697124966162} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab.meta b/Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab.meta similarity index 100% rename from Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab.meta rename to Assets/_DDD/Restaurant/Environments/Interactables/Prop_CustomerTable.prefab.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab deleted file mode 100644 index 7d256654c..000000000 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_CustomerTable.prefab +++ /dev/null @@ -1,377 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1001 &4777358697124966162 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalScale.x - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalScale.y - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalScale.z - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_ConstrainProportionsScale - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_Name - value: Prop_CustomerTable - objectReference: {fileID: 0} - - target: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_StaticEditorFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7856941568993672895, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_StaticEditorFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8282162905857597943, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_StaticEditorFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8467019391491472137, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: 56d0a02ae31152e45ba2da46f7694378, type: 2} - - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_Size.x - value: 0.93 - objectReference: {fileID: 0} - - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_Size.z - value: 0.31 - objectReference: {fileID: 0} - - target: {fileID: 8516969404588314361, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - propertyPath: m_Center.z - value: 0.14 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - insertIndex: -1 - addedObject: {fileID: 8605899758048842936} - - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - insertIndex: -1 - addedObject: {fileID: 6282952769554945552} - - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - insertIndex: -1 - addedObject: {fileID: 4598203232635129220} - m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} ---- !u!1 &9211739394093953175 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} - m_PrefabInstance: {fileID: 4777358697124966162} - m_PrefabAsset: {fileID: 0} ---- !u!114 &8605899758048842936 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9211739394093953175} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c0b1e0992510498b8d33d5b6094b8f4b, type: 3} - m_Name: - m_EditorClassIdentifier: - _interactionType: 4 - _executionParameters: - _holdTime: 1 - _displayParameters: - _messageKey: - _interactionAvailableFlows: 1 - _aiInteractionPoints: [] - _initialOrderInteractionType: 0 ---- !u!114 &6282952769554945552 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9211739394093953175} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 0} - profileSync: 0 - camerasLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - effectGroup: 0 - effectTarget: {fileID: 0} - effectGroupLayer: - serializedVersion: 2 - m_Bits: 4294967295 - effectNameFilter: - effectNameUseRegEx: 0 - combineMeshes: 0 - alphaCutOff: 0 - cullBackFaces: 1 - padding: 0 - ignoreObjectVisibility: 0 - reflectionProbes: 0 - GPUInstancing: 1 - sortingPriority: 0 - optimizeSkinnedMesh: 1 - depthClip: 0 - cameraDistanceFade: 0 - cameraDistanceFadeNear: 0 - cameraDistanceFadeFar: 1000 - normalsOption: 0 - ignore: 0 - _highlighted: 0 - fadeInDuration: 0 - fadeOutDuration: 0 - flipY: 0 - constantWidth: 1 - extraCoveragePixels: 0 - minimumWidth: 0 - subMeshMask: -1 - overlay: 0 - overlayMode: 0 - overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - overlayAnimationSpeed: 1 - overlayMinIntensity: 0.5 - overlayBlending: 1 - overlayTexture: {fileID: 0} - overlayTextureUVSpace: 0 - overlayTextureScale: 1 - overlayTextureScrolling: {x: 0, y: 0} - overlayVisibility: 0 - outline: 1 - outlineColor: {r: 0, g: 0, b: 0, a: 1} - outlineColorStyle: 0 - outlineGradient: - serializedVersion: 2 - key0: {r: 1, g: 1, b: 1, a: 1} - key1: {r: 1, g: 1, b: 1, a: 1} - key2: {r: 0, g: 0, b: 0, a: 0} - key3: {r: 0, g: 0, b: 0, a: 0} - key4: {r: 0, g: 0, b: 0, a: 0} - key5: {r: 0, g: 0, b: 0, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 0 - ctime1: 65535 - ctime2: 0 - ctime3: 0 - ctime4: 0 - ctime5: 0 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 0 - m_ColorSpace: -1 - m_NumColorKeys: 2 - m_NumAlphaKeys: 2 - outlineGradientInLocalSpace: 0 - outlineWidth: 0.45 - outlineBlurPasses: 2 - outlineQuality: 3 - outlineEdgeMode: 0 - outlineEdgeThreshold: 0.995 - outlineSharpness: 1 - outlineDownsampling: 1 - outlineVisibility: 0 - glowBlendMode: 0 - outlineBlitDebug: 0 - outlineIndependent: 0 - outlineContourStyle: 0 - outlineMaskMode: 0 - glow: 0 - glowWidth: 0.4 - glowQuality: 3 - glowBlurMethod: 0 - glowDownsampling: 2 - glowHQColor: {r: 0.64, g: 1, b: 0, a: 1} - glowDithering: 1 - glowDitheringStyle: 0 - glowMagicNumber1: 0.75 - glowMagicNumber2: 0.5 - glowAnimationSpeed: 1 - glowVisibility: 0 - glowBlitDebug: 0 - glowBlendPasses: 1 - glowPasses: - - offset: 4 - alpha: 0.1 - color: {r: 0.64, g: 1, b: 0, a: 1} - - offset: 3 - alpha: 0.2 - color: {r: 0.64, g: 1, b: 0, a: 1} - - offset: 2 - alpha: 0.3 - color: {r: 0.64, g: 1, b: 0, a: 1} - - offset: 1 - alpha: 0.4 - color: {r: 0.64, g: 1, b: 0, a: 1} - glowMaskMode: 0 - innerGlow: 0 - innerGlowWidth: 1 - innerGlowColor: {r: 1, g: 1, b: 1, a: 1} - innerGlowBlendMode: 0 - innerGlowVisibility: 0 - targetFX: 0 - targetFXTexture: {fileID: 0} - targetFXColor: {r: 1, g: 1, b: 1, a: 1} - targetFXCenter: {fileID: 0} - targetFXRotationSpeed: 50 - targetFXInitialScale: 4 - targetFXEndScale: 1.5 - targetFXScaleToRenderBounds: 1 - targetFXUseEnclosingBounds: 0 - targetFXAlignToGround: 0 - targetFXOffset: {x: 0, y: 0, z: 0} - targetFXFadePower: 32 - targetFXGroundMaxDistance: 10 - targetFXGroundLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - targetFXTransitionDuration: 0.5 - targetFXStayDuration: 1.5 - targetFXVisibility: 1 - iconFX: 0 - iconFXMesh: {fileID: 0} - iconFXLightColor: {r: 1, g: 1, b: 1, a: 1} - iconFXDarkColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - iconFXCenter: {fileID: 0} - iconFXRotationSpeed: 50 - iconFXAnimationOption: 0 - iconFXAnimationAmount: 0.1 - iconFXAnimationSpeed: 3 - iconFXScale: 1 - iconFXScaleToRenderBounds: 0 - iconFXOffset: {x: 0, y: 1, z: 0} - iconFXTransitionDuration: 0.5 - iconFXStayDuration: 1.5 - seeThrough: 2 - seeThroughOccluderMask: - serializedVersion: 2 - m_Bits: 4294967295 - seeThroughOccluderThreshold: 0.3 - seeThroughOccluderMaskAccurate: 0 - seeThroughOccluderCheckInterval: 1 - seeThroughOccluderCheckIndividualObjects: 0 - seeThroughDepthOffset: 0 - seeThroughMaxDepth: 0 - seeThroughIntensity: 0.8 - seeThroughTintAlpha: 0.5 - seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1} - seeThroughNoise: 1 - seeThroughBorder: 0 - seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1} - seeThroughBorderOnly: 0 - seeThroughBorderWidth: 0.45 - seeThroughOrdered: 0 - seeThroughTexture: {fileID: 0} - seeThroughTextureUVSpace: 0 - seeThroughTextureScale: 1 - seeThroughChildrenSortingMode: 0 - rmsCount: 1 - hitFxInitialIntensity: 0 - hitFxMode: 0 - hitFxFadeOutDuration: 0.25 - hitFxColor: {r: 1, g: 1, b: 1, a: 1} - hitFxRadius: 0.5 ---- !u!114 &4598203232635129220 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9211739394093953175} - 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 - Opacity: 1 - _focusedStyle: - Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - Width: 1 - Opacity: 1 - _unavailableStyle: - Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} - Width: 0.5 - Opacity: 1 - _objectiveStyle: - Color: {r: 0, g: 1, b: 1, a: 1} - Width: 1 - Opacity: 1 - _breathingSpeed: 2 - _breathingRange: 0.3 - _enableBreathingEffect: 1 - _alphaCutOff: 0.5 - _combineMeshes: 1 - _constantWidth: 1 - _outlineQuality: 2 - _outlineIndependent: 1 - _outlineBlurPasses: 1 - _outlineSharpness: 8 - _currentOutlineType: 0 - _currentOpacityMultiplier: 1 diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index c52bd47fd..9f65a3ddc 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -20,7 +20,7 @@ public struct InteractionExecutionParameters { [SerializeField] private float _holdTime; public float HoldTime => _holdTime; - public InteractionExecutionParameters(float holdTime = 1f) + public InteractionExecutionParameters(float holdTime = 0f) { _holdTime = holdTime; } diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index 40b619387..97c52ac12 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -6,11 +6,12 @@ namespace DDD [Flags] public enum RestaurantOrderType : uint { - Wait = 0, - Order = 1u << 0, - Serve = 1u << 1, + Wait = 0u, + Reserved = 1u, + Order = 1u << 1, + Serve = 1u << 2, } - + public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject { [SerializeField] protected RestaurantOrderType orderType = RestaurantOrderType.Wait; @@ -25,11 +26,8 @@ private void Start() public bool CanInteract() { - // 현재 RestaurantOrderInteractionType를 수행할 수 있는지? if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { - Debug.Assert(false); // TODO - // Check WaitCustomer return true; } return false; @@ -37,7 +35,6 @@ public bool CanInteract() public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { - // _currentRestaurantOrderInteractionType에 따라 동작이 달라지겠지 if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { // DO WAIT CUSTOMER diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs index 38bfe2d87..6fc753ec3 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -10,6 +10,7 @@ public static class RestaurantOrderSolvers public static Dictionary TypeToOrderSolver = new() { { RestaurantOrderType.Wait, typeof(RestaurantOrderSolver_Wait) }, + { RestaurantOrderType.Reserved, typeof(RestaurantOrderSolver_Reserved) }, { RestaurantOrderType.Order, typeof(RestaurantOrderSolver_Order) }, { RestaurantOrderType.Serve, typeof(RestaurantOrderSolver_Serve) } }; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs new file mode 100644 index 000000000..c12a9ab2b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Reserved : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs.meta new file mode 100644 index 000000000..9d4d3307f --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f62abf1706184529880b9353b63a2adc +timeCreated: 1755682089 \ No newline at end of file From 56a08801847d746bcf02a656815d0eec46e20c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Wed, 20 Aug 2025 18:55:30 +0900 Subject: [PATCH 7/8] =?UTF-8?q?=EC=84=9C=EB=B8=8C=20=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=85=9C=20=EC=88=98=EC=A0=95,=20=EC=9D=B8=ED=84=B0=EB=A0=89?= =?UTF-8?q?=ED=8A=B8=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=20?= =?UTF-8?q?=EC=84=9C=EB=B8=8C=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4=EC=8A=A4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Environments/Props/Prop_Open.prefab | 26 ++++++++-- .../Prop/MenuBoard/PropMenuBoard.prefab | 22 ++++++++- .../Prefabs/RestaurantPlayer.prefab | 2 +- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 7 ++- .../GameEvent/InteractionSubsystem.cs | 1 - .../IInteractionSubsystemOwner.cs | 10 ++++ .../IInteractionSubsystemOwner.cs.meta | 3 ++ .../RestaurantManagementInteraction.cs | 16 ------ ...estaurantManagementInteractionSubsystem.cs | 36 ++++++++++++++ ...antManagementInteractionSubsystem.cs.meta} | 0 .../RestaurantOrderInteractionSubsystem.cs | 4 +- .../RestaurantEnvironment.cs | 6 +++ .../RestaurantInteractionComponent.cs | 29 ++++++++++- .../RestaurantInteractionEvents.cs | 3 +- .../Solvers/RestaurantManagements.meta | 3 ++ .../RestaurantManagementSolver.cs | 23 +++++++++ .../RestaurantManagementSolver.cs.meta | 3 ++ .../RestaurantManagementSolver_Menu.cs} | 8 +-- .../RestaurantManagementSolver_Menu.cs.meta} | 0 .../RestaurantManagementSolver_Start.cs} | 21 ++++---- .../RestaurantManagementSolver_Start.cs.meta} | 0 .../Solvers/RestaurantOrderSolver.cs | 37 ++------------ .../Solvers/RestaurantSubsystemSolver.cs | 49 +++++++++++++++++++ .../Solvers/RestaurantSubsystemSolver.cs.meta | 3 ++ 24 files changed, 230 insertions(+), 82 deletions(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs.meta delete mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs rename Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/{RestaurantManagementInteraction.cs.meta => RestaurantManagementInteractionSubsystem.cs.meta} (100%) create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs.meta rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{RestaurantManagementUiEventSolver.cs => RestaurantManagements/RestaurantManagementSolver_Menu.cs} (51%) rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{RestaurantManagementUiEventSolver.cs.meta => RestaurantManagements/RestaurantManagementSolver_Menu.cs.meta} (100%) rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{RestaurantOpenEventSolver.cs => RestaurantManagements/RestaurantManagementSolver_Start.cs} (53%) rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{RestaurantOpenEventSolver.cs.meta => RestaurantManagements/RestaurantManagementSolver_Start.cs.meta} (100%) create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab index fa7374f77..e3535c2f0 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab @@ -113,6 +113,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} insertIndex: -1 addedObject: {fileID: 6899480242032072806} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: -4132148316966952702} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} --- !u!1 &9211739394093953175 stripped GameObject: @@ -131,10 +134,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} m_Name: m_EditorClassIdentifier: - _interactionType: 2 - _holdTime: 0 - _interactionMessageKey: Test + _interactionType: 1 + _executionParameters: + _holdTime: 1 + _displayParameters: + _messageKey: _interactionAvailableFlows: 1 + _aiInteractionPoints: [] + autoInitialize: 1 --- !u!114 &3538352761187622062 MonoBehaviour: m_ObjectHideFlags: 0 @@ -375,3 +382,16 @@ MonoBehaviour: _outlineSharpness: 8 _currentOutlineType: 0 _currentOpacityMultiplier: 1 +--- !u!114 &-4132148316966952702 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9211739394093953175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} + m_Name: + m_EditorClassIdentifier: + _managementType: 1 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab index ddf5310b2..149bc761d 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab @@ -97,6 +97,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} insertIndex: -1 addedObject: {fileID: 5410819217098966190} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: -1096657863250535257} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} --- !u!1 &580268897300907643 stripped GameObject: @@ -116,9 +119,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _interactionType: 1 - _holdTime: 0 - _interactionMessageKey: Test + _executionParameters: + _holdTime: 1 + _displayParameters: + _messageKey: _interactionAvailableFlows: 1 + _aiInteractionPoints: [] --- !u!114 &4545680930728379745 MonoBehaviour: m_ObjectHideFlags: 0 @@ -359,3 +365,15 @@ MonoBehaviour: _outlineSharpness: 8 _currentOutlineType: 0 _currentOpacityMultiplier: 1 +--- !u!114 &-1096657863250535257 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 580268897300907643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab index c1e3a3a75..cc9051a7a 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab @@ -423,7 +423,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3} m_Name: m_EditorClassIdentifier: - _interactionType: 4294967287 + _availableInteractions: 1 _nearColliders: - {fileID: 0} - {fileID: 0} diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index c52bd47fd..a0c5cbe95 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -8,10 +8,9 @@ namespace DDD public enum InteractionType : uint { None = 0u, - RestaurantManagementUi = 1u << 0, - OpenRestaurant = 1u << 1, - RestaurantOrder = 1u << 2, - RestaurantMeal = 1u << 3, + RestaurantManagement = 1u << 0, + RestaurantOrder = 1u << 1, + RestaurantMeal = 1u << 2, All = 0xFFFFFFFFu } diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index 1085117d3..655419a6e 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -5,7 +5,6 @@ namespace DDD { public interface IInteractionSubsystemObject { - Type GetSubsystemEnumType(); void InitializeSubsystem(); bool CanInteract(); bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs new file mode 100644 index 000000000..bd99e64be --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs @@ -0,0 +1,10 @@ +using System; +using UnityEngine; + +namespace DDD +{ + public interface IInteractionSubsystemOwner + { + public bool TryGetSubsystemObject(out IInteractionSubsystemObject subsystemObject) where T : Enum; + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs.meta new file mode 100644 index 000000000..d15ead482 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/IInteractionSubsystemOwner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 254d64ce6ee84b20a154931fcf04958f +timeCreated: 1755681729 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs deleted file mode 100644 index c2df3a351..000000000 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace DDD -{ - [Flags] - public enum RestaurantManagementType : uint - { - OpenRestaurantMenu = 0, - StartRestaurant = 1, - } - - //public class RestaurantManagementInteraction : RestaurantInteractionComponent, IInteractionSubsystemObject - //{ - // - //} -} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs new file mode 100644 index 000000000..8be8f9b3f --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs @@ -0,0 +1,36 @@ +using System; +using UnityEngine; + +namespace DDD +{ + [Flags] + public enum RestaurantManagementType : uint + { + OpenRestaurantMenu = 0, + StartRestaurant = 1, + } + + public class RestaurantManagementInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject + { + [SerializeField] protected RestaurantManagementType _managementType = RestaurantManagementType.OpenRestaurantMenu; + public RestaurantManagementType GetInteractionSubsystemType() + { + return _managementType; + } + + public void InitializeSubsystem() + { + + } + + public bool CanInteract() + { + return true; + } + + public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteraction.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index 40b619387..59ec44864 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -15,9 +15,7 @@ public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSu { [SerializeField] protected RestaurantOrderType orderType = RestaurantOrderType.Wait; private RestaurantOrderType currentRestaurantOrderType; - - public Type GetSubsystemEnumType() => typeof(RestaurantOrderType); - + private void Start() { currentRestaurantOrderType = orderType; diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs index a2d647545..ea9252369 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs @@ -1,3 +1,4 @@ +using System; using Spine.Unity; using Unity.VisualScripting; using UnityEngine; @@ -13,6 +14,11 @@ public class RestaurantEnvironment : MonoBehaviour private Transform _visualLook; private Renderer _renderer; + private void Start() + { + Initialize(restaurantPropLocation); + } + public async void Initialize(RestaurantPropLocation location) { EnvironmentData environmentData = DataManager.Instance.GetDataSo().GetDataById(location.Id); diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 72090e59d..2cf9c4102 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -11,12 +11,13 @@ public static class RestaurantInteractionSubsystems { public static Dictionary TypeToSubsystem = new() { - {InteractionType.RestaurantOrder, typeof(RestaurantOrderInteractionSubsystem)} + {InteractionType.RestaurantOrder, typeof(RestaurantOrderInteractionSubsystem)}, + {InteractionType.RestaurantManagement, typeof(RestaurantManagementInteractionSubsystem)} }; } - public class RestaurantInteractionComponent : MonoBehaviour, IInteractable + public class RestaurantInteractionComponent : MonoBehaviour, IInteractable, IInteractionSubsystemOwner { // Single interaction type [ValueDropdown("GetAllInteractionTypes")] @@ -25,9 +26,18 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable [SerializeField] protected InteractionDisplayParameters _displayParameters = new InteractionDisplayParameters(""); [SerializeField] protected GameFlowState _interactionAvailableFlows; [SerializeField] private Transform[] _aiInteractionPoints; + [SerializeField] private bool autoInitialize = true; private Dictionary _subsystems = new(); + private void Start() + { + if (autoInitialize) + { + InitializeInteraction(_interactionType); + } + } + private static IEnumerable GetAllInteractionTypes() { return System.Enum.GetValues(typeof(InteractionType)) @@ -153,5 +163,20 @@ public Vector3[] GetInteractionPoints() } return positions; } + + public bool TryGetSubsystemObject(out IInteractionSubsystemObject subsystemObject) where T : Enum + { + foreach (var interactionSubsystemObject in _subsystems.Values) + { + if (interactionSubsystemObject is IInteractionSubsystemObject subsystem) + { + subsystemObject = subsystem; + return true; + } + } + + subsystemObject = null; + return false; + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs index 6d9021765..2afa9b785 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs @@ -13,8 +13,7 @@ public static class RestaurantInteractionEventSolvers { public static Dictionary TypeToSolver = new() { - {InteractionType.RestaurantManagementUi, typeof(RestaurantManagementUiEventSolver)}, - {InteractionType.OpenRestaurant, typeof(RestaurantOpenEventSolver)}, + {InteractionType.RestaurantManagement, typeof(RestaurantManagementSolver)}, {InteractionType.RestaurantOrder, typeof(RestaurantOrderSolver)} }; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements.meta new file mode 100644 index 000000000..da3e18e6c --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ad4643acb4b34f1ab27e79503ccff0dd +timeCreated: 1755677592 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs new file mode 100644 index 000000000..0681cfb69 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using DDD.RestaurantOrders; +using UnityEngine; + +namespace DDD +{ + public static class RestaurantManagementSolvers + { + public static Dictionary TypeToManagementSolver = new() + { + { RestaurantManagementType.OpenRestaurantMenu, typeof(RestaurantManagementSolver_Menu) }, + { RestaurantManagementType.StartRestaurant, typeof(RestaurantManagementSolver_Start) } + }; + } + public class RestaurantManagementSolver : RestaurantSubsystemSolver + { + protected override Dictionary GetSubsystemSolverTypeMappings() + { + return RestaurantManagementSolvers.TypeToManagementSolver; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs.meta new file mode 100644 index 000000000..a9847e43f --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c457857b6ba0432db546ef0d8970548d +timeCreated: 1755677639 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagementUiEventSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs similarity index 51% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagementUiEventSolver.cs rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs index c740cfb4f..4c4e3ab26 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagementUiEventSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs @@ -2,11 +2,11 @@ namespace DDD { - public class RestaurantManagementUiEventSolver : MonoBehaviour, IInteractionSolver + public class RestaurantManagementSolver_Menu : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) { - if (CanExecuteInteraction() == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; var evt = GameEvents.OpenPopupUiEvent; evt.UiType = typeof(RestaurantManagementUi); @@ -14,7 +14,7 @@ public bool ExecuteInteraction(IInteractor interactor, IInteractable interactabl return true; } - public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payloadSo = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagementUiEventSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagementUiEventSolver.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOpenEventSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs similarity index 53% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOpenEventSolver.cs rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs index ccc92fd90..fe7f96388 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOpenEventSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs @@ -3,22 +3,23 @@ namespace DDD { - public class RestaurantOpenEventSolver : MonoBehaviour, IInteractionSolver + public class RestaurantManagementSolver_Start : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject interactionPayloadSo = null) - { - if (CanExecuteInteraction() == false) return false; - - _ = GameFlowManager.Instance.ChangeFlow(GameFlowState.RunRestaurant); - return true; - } - private RestaurantManagementState GetManagementState() { return RestaurantState.Instance.ManagementState; } - public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; + + _ = GameFlowManager.Instance.ChangeFlow(GameFlowState.RunRestaurant); + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOpenEventSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOpenEventSolver.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs index 38bfe2d87..b54ef3956 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -15,42 +15,11 @@ public static class RestaurantOrderSolvers }; } - public class RestaurantOrderSolver : MonoBehaviour, IInteractionSolver + public class RestaurantOrderSolver : RestaurantSubsystemSolver { - private Dictionary> _solvers = new(); - - private void Start() + protected override Dictionary GetSubsystemSolverTypeMappings() { - foreach (var orderSolver in RestaurantOrderSolvers.TypeToOrderSolver) - { - var solver = (IInteractionSubsystemSolver)gameObject.AddComponent(orderSolver.Value); - _solvers.Add(orderSolver.Key, solver); - } - } - - public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) - { - return TryGetSolver(interactable, out var solver) && - solver.ExecuteInteractionSubsystem(interactor, interactable, payloadSo); - } - - public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) - { - return TryGetSolver(interactable, out var solver) && - solver.CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); - } - - // Solver를 가져오는 공통 로직 - private bool TryGetSolver(IInteractable interactable, out IInteractionSubsystemSolver solver) - { - solver = null; - - if (interactable is not IInteractionSubsystemObject subsystem) - return false; - - var type = subsystem.GetInteractionSubsystemType(); - return _solvers.TryGetValue(type, out solver); + return RestaurantOrderSolvers.TypeToOrderSolver; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs new file mode 100644 index 000000000..6edbf5102 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace DDD +{ + public abstract class RestaurantSubsystemSolver : MonoBehaviour, IInteractionSolver where T : Enum + { + private Dictionary> _solvers = new(); + + protected abstract Dictionary GetSubsystemSolverTypeMappings(); + + private void Start() + { + foreach (var subsystemSolverType in GetSubsystemSolverTypeMappings()) + { + var solver = (IInteractionSubsystemSolver)gameObject.AddComponent(subsystemSolverType.Value); + _solvers.Add(subsystemSolverType.Key, solver); + } + } + public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + return TryGetSolver(interactable, out var solver) && + solver.ExecuteInteractionSubsystem(interactor, interactable, payloadSo); + } + + public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return TryGetSolver(interactable, out var solver) && + solver.CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); + } + + // Solver를 가져오는 공통 로직 + private bool TryGetSolver(IInteractable interactable, out IInteractionSubsystemSolver solver) + { + solver = null; + + var owner = interactable as IInteractionSubsystemOwner; + IInteractionSubsystemObject subsystem = null; + bool isExist = owner != null && owner.TryGetSubsystemObject(out subsystem); + + if (!isExist || subsystem == null) return false; + + var type = subsystem.GetInteractionSubsystemType(); + return _solvers.TryGetValue(type, out solver); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs.meta new file mode 100644 index 000000000..a27412565 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 716224c78a914321b7b7e43a93860465 +timeCreated: 1755677990 \ No newline at end of file From 117ed8228b006c9a4d9293f1ed0f0a634c75ce27 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Date: Wed, 20 Aug 2025 10:00:39 +0000 Subject: [PATCH 8/8] Update Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs --- .../_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs index ea9252369..344fd6309 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs @@ -14,11 +14,6 @@ public class RestaurantEnvironment : MonoBehaviour private Transform _visualLook; private Renderer _renderer; - private void Start() - { - Initialize(restaurantPropLocation); - } - public async void Initialize(RestaurantPropLocation location) { EnvironmentData environmentData = DataManager.Instance.GetDataSo().GetDataById(location.Id);