From a1c33cdaf5a33f859dcdf1ad90291534f37c67b6 Mon Sep 17 00:00:00 2001 From: NTG Date: Wed, 27 Aug 2025 13:18:44 +0900 Subject: [PATCH] =?UTF-8?q?payload=20=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 5 ++-- .../GameEvent/InteractionSubsystem.cs | 5 ++-- .../RestaurantCookInteractionSubsystem.cs | 5 ++++ .../RestaurantInteractionComponent.cs | 25 +++---------------- .../RestaurantInteractionEvents.cs | 14 +++++------ .../RestaurantCookSolver_OpenCookUi.cs | 8 +++--- .../RestaurantManagementSolver_Menu.cs | 6 ++--- .../RestaurantManagementSolver_Start.cs | 6 ++--- .../RestaurantMealSolver_WaitForOrder.cs | 5 ++-- .../RestaurantMealSolver_WaitForServe.cs | 5 ++-- .../RestaurantOrderSolver_Busy.cs | 6 ++--- .../RestaurantOrderSolver_Dirty.cs | 5 ++-- .../RestaurantOrderSolver_Order.cs | 4 +-- .../RestaurantOrderSolver_Reserved.cs | 4 +-- .../RestaurantOrderSolver_Serve.cs | 4 +-- .../RestaurantOrderSolver_Wait.cs | 6 ++--- .../Solvers/RestaurantSubsystemSolver.cs | 8 +++--- ProjectSettings/EditorBuildSettings.asset | 2 +- 18 files changed, 50 insertions(+), 73 deletions(-) diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index 8011583a4..7e3ab45d0 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -48,7 +48,6 @@ public interface IInteractable InteractionExecutionParameters GetExecutionParameters(); InteractionDisplayParameters GetDisplayParameters(); Vector3[] GetInteractionPoints(); - ScriptableObject GetPayload(); } public interface IInteractor @@ -62,7 +61,7 @@ bool CanInteractTo(IInteractable interactable, public interface IInteractionSolver { - bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null); - bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null); + bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null); + bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null); } } diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index ac19eefae..cbdc7a8c0 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -8,7 +8,6 @@ public interface IInteractionSubsystemObject void InitializeSubsystem(); bool CanInteract(); bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); - ScriptableObject GetPayload(); } public interface IInteractionSubsystemObject : IInteractionSubsystemObject where T : Enum { @@ -21,7 +20,7 @@ public interface IInteractionSubsystemSolver } public interface IInteractionSubsystemSolver : IInteractionSubsystemSolver where T : Enum { - bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null); - bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null); + bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null); + bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null); } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantCookInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantCookInteractionSubsystem.cs index 288c52248..8853c91ae 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantCookInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantCookInteractionSubsystem.cs @@ -18,6 +18,11 @@ public RestaurantCookType GetInteractionSubsystemType() return _cookType; } + public void SetInteractionSubsystemType(RestaurantCookType inValue) + { + + } + public virtual void InitializeSubsystem() { diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index a7059d6dc..48a3e4e86 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -31,19 +31,7 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable, IInt private bool _isInitialized = false; private Dictionary _subsystems = new(); - - private void OnEnable() - { - // Register this interactable to environment state - var environmentState = RestaurantState.Instance?.EnvironmentState; - environmentState?.RegisterInteractable(this); - - if (autoInitialize && !_isInitialized) - { - InitializeInteraction(_interactionType); - } - } - + private void OnDisable() { var environmentState = RestaurantState.Instance?.EnvironmentState; @@ -87,7 +75,7 @@ public virtual bool IsInteractionHidden() return flowDisabled; } - public virtual bool OnInteracted(IInteractor interactor, ScriptableObject causerPayload = null) + public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payload = null) { if (CanInteract() == false) { @@ -95,10 +83,10 @@ public virtual bool OnInteracted(IInteractor interactor, ScriptableObject causer } bool interactionResult = RestaurantInteractionEvents.RestaurantInteraction.RequestInteraction(interactor.GetInteractorGameObject(), - GetInteractableGameObject(), GetInteractionType(), causerPayload, GetPayload(), true); + GetInteractableGameObject(), GetInteractionType(), payload, true); if (HasSubsystem(_interactionType)) { - interactionResult &= GetSubsystem(_interactionType).OnInteracted(interactor, causerPayload); + interactionResult &= GetSubsystem(_interactionType).OnInteracted(interactor, payload); } return interactionResult; } @@ -195,11 +183,6 @@ public Vector3[] GetInteractionPoints() return positions; } - public ScriptableObject GetPayload() - { - return TryGetSubsystem(_interactionType, out var subsystem) ? subsystem.GetPayload() : null; - } - public bool TryGetSubsystemObject(out IInteractionSubsystemObject subsystemObject) where T : Enum { foreach (var interactionSubsystemObject in _subsystems.Values) diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs index bcf28a65b..4c835ec2d 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs @@ -25,30 +25,28 @@ public class RestaurantInteractionEvent : IEvent public GameObject Causer; public GameObject Target; public InteractionType InteractionType; - public ScriptableObject CauserPayload; - public ScriptableObject TargetPayload; + public ScriptableObject Payload; public bool EventResult = false; public RestaurantInteractionEvent MakeInteractionEvent(GameObject causer, GameObject target, InteractionType interactionType, - ScriptableObject causerPayload, ScriptableObject targetPayload) + ScriptableObject payload = null) { Causer = causer; Target = target; InteractionType = interactionType; - CauserPayload = causerPayload; - TargetPayload = targetPayload; + Payload = payload; return this; } public bool RequestInteraction(GameObject causer, GameObject target, InteractionType interactionType, - ScriptableObject causerPayload = null, ScriptableObject targetPayload = null, bool shouldBroadcastAfterSolve = true) + ScriptableObject payload = null, bool shouldBroadcastAfterSolve = true) { if (interactionType == InteractionType.None) { return false; } - var evt = MakeInteractionEvent(causer, target, interactionType, causerPayload, targetPayload); + var evt = MakeInteractionEvent(causer, target, interactionType, payload); evt.EventResult = false; // Solve event directly. 이벤트 처리는 여기서 하고, 이벤트 호출로는 이런 이벤트가 호출되었고 결과가 어떻다는 거 전파하는 식으로. if (RestaurantInteractionEventSolvers.TypeToSolver.TryGetValue(interactionType, out var solverType)) @@ -61,7 +59,7 @@ public bool RequestInteraction(GameObject causer, GameObject target, Interaction // Cast solverComponent to IInteractable if (solver is not null && interactor is not null) { - evt.EventResult = solver.ExecuteInteraction(interactor, interactable, causerPayload, targetPayload); + evt.EventResult = solver.ExecuteInteraction(interactor, interactable, payload); } else { diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs index 01380a4e7..4214524ab 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantCooks/RestaurantCookSolver_OpenCookUi.cs @@ -4,10 +4,9 @@ namespace DDD { public class RestaurantCookSolver_OpenCookUi : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, payload) == false) return false; var evt = GameEvents.OpenPopupUiEvent; evt.UiType = typeof(CookUi); @@ -16,8 +15,7 @@ public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable in return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; return currentGameFlowState == GameFlowState.RunRestaurant; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs index 46ddfc86e..73005e436 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs @@ -4,9 +4,9 @@ namespace DDD { public class RestaurantManagementSolver_Menu : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, payload) == false) return false; var evt = GameEvents.OpenPopupUiEvent; evt.UiType = typeof(RestaurantManagementUi); @@ -14,7 +14,7 @@ public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable in return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; return currentGameFlowState == GameFlowState.ReadyForRestaurant; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs index c3f18b42b..a54d51579 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs @@ -10,15 +10,15 @@ private RestaurantManagementState GetManagementState() return RestaurantState.Instance.ManagementState; } - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, payload) == false) return false; _ = GameFlowManager.Instance.ChangeFlow(GameFlowState.RunRestaurant); return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs index 59236cb16..08e335c53 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs @@ -4,13 +4,12 @@ namespace DDD { public class RestaurantMealSolver_WaitForOrder : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs index 86851c9f0..cddc8d0b3 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs @@ -4,13 +4,12 @@ namespace DDD { public class RestaurantMealSolver_WaitForServe : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs index a53ef8b77..653658f12 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs @@ -4,15 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Busy : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs index 8819bfe60..c1d6751d3 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs @@ -4,14 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Dirty : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs index 8b8f3a6ae..0d749254f 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs @@ -4,13 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Order : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs index 5f6fa57dd..04583c485 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs @@ -4,13 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Reserved : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { // Interactable's CurrentInteractor is me? => Can execute return false; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs index a2732eb8c..79407afc9 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs @@ -4,13 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Serve : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs index c1f980df2..45dac052c 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -5,9 +5,9 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, payload) == false) return false; // TODO : DO SOMETHING!!! /* TODO * OnInteracted에서 상태를 바꾸는 대신, 여기서 직접 바꿔주고, 현재 나에게 점유되어 있다는 사실을 알려주기? 그리고 CanInteractTo에서 이게 일치해야만 참 반환하게? @@ -16,7 +16,7 @@ public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable in return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs index 34e190d8b..1e6326cde 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs @@ -18,16 +18,16 @@ private void Awake() _solvers.Add(subsystemSolverType.Key, solver); } } - public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payload = null) { return TryGetSolver(interactable, out var solver) && - solver.ExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo); + solver.ExecuteInteractionSubsystem(interactor, interactable, payload); } - public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payload = null) { return TryGetSolver(interactable, out var solver) && - solver.CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo); + solver.CanExecuteInteractionSubsystem(interactor, interactable, payload); } // Solver를 가져오는 공통 로직 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index b1d747c7b..ed8485fa0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d69f9ac4352f59df16943fd905dd7351328f295b2a8e4f74e8346f7bd4dc1bc +oid sha256:f86abe14bf9fc4c7c93dfa96efd110ef0f56c3fb96a952c57e06a723fc87c352 size 1075