From 88a11022b3320266da0a5d0791d386c7db3ddbf4 Mon Sep 17 00:00:00 2001 From: NTG Date: Tue, 26 Aug 2025 17:27:50 +0900 Subject: [PATCH] =?UTF-8?q?interactable=EC=9A=A9=20payload=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=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 | 5 +- .../Prop/Brazier1/Prop_Brazier1.prefab | 293 +++++++++++++++++- .../Environments/Prop/Fried/Prop_Fried.prefab | 293 +++++++++++++++++- .../Prop/MenuBoard/PropMenuBoard.prefab | 7 +- .../Environments/Prop/Pot1/Prop_Pot1.prefab | 293 +++++++++++++++++- .../_DDD/_Scripts/GameEvent/IInteractable.cs | 8 +- .../GameEvent/InteractionSubsystem.cs | 6 +- .../AutoCreated/So/EnvironmentDataSo.asset | 2 +- ...estaurantManagementInteractionSubsystem.cs | 26 +- .../RestaurantOrderInteractionSubsystem.cs | 5 + .../RestaurantInteractionComponent.cs | 17 +- .../RestaurantInteractionEvents.cs | 15 +- .../RestaurantManagementSolver.cs | 5 +- .../RestaurantManagementSolver_Cook.cs | 26 ++ .../RestaurantManagementSolver_Cook.cs.meta | 2 + .../RestaurantManagementSolver_Menu.cs | 7 +- .../RestaurantManagementSolver_Start.cs | 7 +- .../RestaurantOrderSolver_Order.cs | 5 +- .../RestaurantOrderSolver_Reserved.cs | 5 +- .../RestaurantOrderSolver_Serve.cs | 5 +- .../RestaurantOrderSolver_Wait.cs | 5 +- .../Solvers/RestaurantSubsystemSolver.cs | 9 +- ProjectSettings/EditorBuildSettings.asset | 2 +- 23 files changed, 993 insertions(+), 55 deletions(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab index e3535c2f0..17ed7f4b3 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab @@ -136,9 +136,9 @@ MonoBehaviour: m_EditorClassIdentifier: _interactionType: 1 _executionParameters: - _holdTime: 1 + _holdTime: 0.5 _displayParameters: - _messageKey: + _messageKey: Test _interactionAvailableFlows: 1 _aiInteractionPoints: [] autoInitialize: 1 @@ -395,3 +395,4 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _managementType: 1 + _cookwareType: 0 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Prop_Brazier1.prefab b/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Prop_Brazier1.prefab index 870884795..1f1312fcc 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Prop_Brazier1.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/Brazier1/Prop_Brazier1.prefab @@ -335,8 +335,299 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} insertIndex: -1 addedObject: {fileID: 5638108731404363405} - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 9109890696398459938} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 3145838323634625451} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 2515144362112859512} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 4895648053684561955} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} +--- !u!1 &1277704713268947483 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + m_PrefabInstance: {fileID: 3179941468635428254} + m_PrefabAsset: {fileID: 0} +--- !u!114 &9109890696398459938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277704713268947483} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 1 + _executionParameters: + _holdTime: 0 + _displayParameters: + _messageKey: Test + _interactionAvailableFlows: 2 + _aiInteractionPoints: [] + autoInitialize: 1 +--- !u!114 &3145838323634625451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277704713268947483} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} + m_Name: + m_EditorClassIdentifier: + _managementType: 2 + _cookwareType: 3 +--- !u!114 &2515144362112859512 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277704713268947483} + 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.5 + 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: 1, g: 1, b: 1, 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: 1 + outlineBlurPasses: 1 + outlineQuality: 2 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineSharpness: 8 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 1 + 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: 7 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &4895648053684561955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277704713268947483} + 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 --- !u!4 &3654677467368248574 stripped Transform: m_CorrespondingSourceObject: {fileID: 2204914584875671904, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Fried/Prop_Fried.prefab b/Assets/_DDD/_Addressables/Environments/Prop/Fried/Prop_Fried.prefab index db0b326a9..e279edc69 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Fried/Prop_Fried.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/Fried/Prop_Fried.prefab @@ -216,8 +216,299 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} insertIndex: -1 addedObject: {fileID: 2978044132803761797} - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 3416739030224185287} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 1441865946434836334} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 8087722827342679631} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 6199984767033459821} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} +--- !u!1 &4244061870577629946 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + m_PrefabInstance: {fileID: 540385265470907775} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3416739030224185287 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4244061870577629946} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 1 + _executionParameters: + _holdTime: 0 + _displayParameters: + _messageKey: Test + _interactionAvailableFlows: 2 + _aiInteractionPoints: [] + autoInitialize: 1 +--- !u!114 &1441865946434836334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4244061870577629946} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} + m_Name: + m_EditorClassIdentifier: + _managementType: 2 + _cookwareType: 2 +--- !u!114 &8087722827342679631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4244061870577629946} + 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.5 + 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: 1, g: 1, b: 1, 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: 1 + outlineBlurPasses: 1 + outlineQuality: 2 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineSharpness: 8 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 1 + 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: 6 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &6199984767033459821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4244061870577629946} + 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 --- !u!4 &4499382904539758566 stripped Transform: m_CorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} diff --git a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab index ebc868949..3a88ae0ea 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab @@ -124,11 +124,12 @@ MonoBehaviour: m_EditorClassIdentifier: _interactionType: 1 _executionParameters: - _holdTime: 1 + _holdTime: 0 _displayParameters: - _messageKey: + _messageKey: Test _interactionAvailableFlows: 1 _aiInteractionPoints: [] + autoInitialize: 1 --- !u!114 &4545680930728379745 MonoBehaviour: m_ObjectHideFlags: 0 @@ -381,3 +382,5 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} m_Name: m_EditorClassIdentifier: + _managementType: 0 + _cookwareType: 0 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Prop_Pot1.prefab b/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Prop_Pot1.prefab index dd0799ff5..9bb057c22 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Prop_Pot1.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/Pot1/Prop_Pot1.prefab @@ -252,13 +252,304 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} insertIndex: -1 addedObject: {fileID: 2687516426567675158} - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 5203686636443694984} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 4290522184515279384} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 1120162909698458040} + - targetCorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + insertIndex: -1 + addedObject: {fileID: 4049645275774486586} m_SourcePrefab: {fileID: 100100000, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} --- !u!4 &8675645304246391653 stripped Transform: m_CorrespondingSourceObject: {fileID: 4111453722694982297, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} m_PrefabInstance: {fileID: 4713232586654435836} m_PrefabAsset: {fileID: 0} +--- !u!1 &9003538228676253305 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4438924429928472453, guid: 1d634c3376e4a4684bc984ced9134847, type: 3} + m_PrefabInstance: {fileID: 4713232586654435836} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5203686636443694984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9003538228676253305} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 1 + _executionParameters: + _holdTime: 0 + _displayParameters: + _messageKey: Test + _interactionAvailableFlows: 2 + _aiInteractionPoints: [] + autoInitialize: 1 +--- !u!114 &4290522184515279384 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9003538228676253305} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} + m_Name: + m_EditorClassIdentifier: + _managementType: 2 + _cookwareType: 1 +--- !u!114 &1120162909698458040 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9003538228676253305} + 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.5 + 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: 1, g: 1, b: 1, 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: 1 + outlineBlurPasses: 1 + outlineQuality: 2 + outlineEdgeMode: 0 + outlineEdgeThreshold: 0.995 + outlineSharpness: 8 + outlineDownsampling: 1 + outlineVisibility: 0 + glowBlendMode: 0 + outlineBlitDebug: 0 + outlineIndependent: 1 + 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: 8 + hitFxInitialIntensity: 0 + hitFxMode: 0 + hitFxFadeOutDuration: 0.25 + hitFxColor: {r: 1, g: 1, b: 1, a: 1} + hitFxRadius: 0.5 +--- !u!114 &4049645275774486586 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9003538228676253305} + 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 --- !u!1001 &5406243702551518767 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index 00767d3be..4523a06ca 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -40,13 +40,14 @@ public interface IInteractable { bool CanInteract(); bool IsInteractionHidden(); - bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); + bool OnInteracted(IInteractor interactor, ScriptableObject causerPayload = null); InteractionType GetInteractionType(); GameObject GetInteractableGameObject(); void InitializeInteraction(InteractionType interactionType); InteractionExecutionParameters GetExecutionParameters(); InteractionDisplayParameters GetDisplayParameters(); Vector3[] GetInteractionPoints(); + ScriptableObject GetPayload(); } public interface IInteractor @@ -60,8 +61,7 @@ bool CanInteractTo(IInteractable interactable, public interface IInteractionSolver { - bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); - bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null); + 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); } } diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index 655419a6e..0f49a032b 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -8,6 +8,7 @@ public interface IInteractionSubsystemObject void InitializeSubsystem(); bool CanInteract(); bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); + ScriptableObject GetPayload(); } public interface IInteractionSubsystemObject : IInteractionSubsystemObject where T : Enum { @@ -19,8 +20,7 @@ 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, - ScriptableObject payloadSo = null); + 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); } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset index d1b5123d1..98082d99f 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:863b433c27804f5f08c20382a8565fcfa5d4f79c61a0941ba31545db5031e660 +oid sha256:12badc6747a2bc25c321281b29f30d2397cd92a81d87cabed61151c0fb1a65bb size 1534 diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs index 8be8f9b3f..e8a742c00 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs @@ -8,29 +8,49 @@ public enum RestaurantManagementType : uint { OpenRestaurantMenu = 0, StartRestaurant = 1, + OpenCookUi = 2, + } + + public class CookwareTypePayload : ScriptableObject + { + public CookwareType CookwareType; } public class RestaurantManagementInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject { [SerializeField] protected RestaurantManagementType _managementType = RestaurantManagementType.OpenRestaurantMenu; + [SerializeField] private CookwareType _cookwareType = CookwareType.None; + public RestaurantManagementType GetInteractionSubsystemType() { return _managementType; } - public void InitializeSubsystem() + public virtual void InitializeSubsystem() { } - public bool CanInteract() + public virtual bool CanInteract() { return true; } - public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { return true; } + + public ScriptableObject GetPayload() + { + if (_managementType == RestaurantManagementType.OpenCookUi) + { + var payloadInstance = ScriptableObject.CreateInstance(typeof(CookwareTypePayload)) as CookwareTypePayload; + payloadInstance.CookwareType = _cookwareType; + return payloadInstance; + } + + return null; + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index b224eb969..518e84eaa 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -41,6 +41,11 @@ public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = nu return true; } + public ScriptableObject GetPayload() + { + return null; + } + public void InitializeSubsystem() { diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 2cf9c4102..0970a8410 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -63,17 +63,18 @@ public virtual bool IsInteractionHidden() return flowDisabled; } - public virtual bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + public virtual bool OnInteracted(IInteractor interactor, ScriptableObject causerPayload = null) { if (CanInteract() == false) { return false; } + bool interactionResult = RestaurantInteractionEvents.RestaurantInteraction.RequestInteraction(interactor.GetInteractorGameObject(), - GetInteractableGameObject(), GetInteractionType(), payloadSo, true); + GetInteractableGameObject(), GetInteractionType(), causerPayload, GetPayload(), true); if (HasSubsystem(_interactionType)) { - interactionResult &= GetSubsystem(_interactionType).OnInteracted(interactor, payloadSo); + interactionResult &= GetSubsystem(_interactionType).OnInteracted(interactor, causerPayload); } return interactionResult; } @@ -120,6 +121,11 @@ private IInteractionSubsystemObject GetSubsystem(InteractionType interactionType return _subsystems.GetValueOrDefault(interactionType) as IInteractionSubsystemObject; } + private bool TryGetSubsystem(InteractionType interactionType, out IInteractionSubsystemObject subsystem) + { + return _subsystems.TryGetValue(interactionType, out subsystem); + } + // 새로운 스트럭트 기반 메서드들 public virtual InteractionExecutionParameters GetExecutionParameters() { @@ -164,6 +170,11 @@ 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 2afa9b785..22f626e01 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs @@ -23,25 +23,30 @@ public class RestaurantInteractionEvent : IEvent public GameObject Causer; public GameObject Target; public InteractionType InteractionType; - public ScriptableObject InteractionPayloadSo; + public ScriptableObject CauserPayload; + public ScriptableObject TargetPayload; public bool EventResult = false; public RestaurantInteractionEvent MakeInteractionEvent(GameObject causer, GameObject target, InteractionType interactionType, - ScriptableObject interactionPayloadSo) + ScriptableObject causerPayload, ScriptableObject targetPayload) { Causer = causer; Target = target; + InteractionType = interactionType; + CauserPayload = causerPayload; + TargetPayload = targetPayload; return this; } - public bool RequestInteraction(GameObject causer, GameObject target, InteractionType interactionType, ScriptableObject interactionPayloadSo = null, bool shouldBroadcastAfterSolve = true) + public bool RequestInteraction(GameObject causer, GameObject target, InteractionType interactionType, + ScriptableObject causerPayload = null, ScriptableObject targetPayload = null, bool shouldBroadcastAfterSolve = true) { if (interactionType == InteractionType.None) { return false; } - var evt = MakeInteractionEvent(causer, target, interactionType, interactionPayloadSo); + var evt = MakeInteractionEvent(causer, target, interactionType, causerPayload, targetPayload); evt.EventResult = false; // Solve event directly. 이벤트 처리는 여기서 하고, 이벤트 호출로는 이런 이벤트가 호출되었고 결과가 어떻다는 거 전파하는 식으로. if (RestaurantInteractionEventSolvers.TypeToSolver.TryGetValue(interactionType, out var solverType)) @@ -54,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, interactionPayloadSo); + evt.EventResult = solver.ExecuteInteraction(interactor, interactable, causerPayload, targetPayload); } else { diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs index 0681cfb69..e3e1bf9e1 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using DDD.RestaurantOrders; -using UnityEngine; namespace DDD { @@ -10,7 +8,8 @@ public static class RestaurantManagementSolvers public static Dictionary TypeToManagementSolver = new() { { RestaurantManagementType.OpenRestaurantMenu, typeof(RestaurantManagementSolver_Menu) }, - { RestaurantManagementType.StartRestaurant, typeof(RestaurantManagementSolver_Start) } + { RestaurantManagementType.StartRestaurant, typeof(RestaurantManagementSolver_Start) }, + { RestaurantManagementType.OpenCookUi, typeof(RestaurantManagementSolver_Cook) }, }; } public class RestaurantManagementSolver : RestaurantSubsystemSolver diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs new file mode 100644 index 000000000..4cdc8b8b0 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace DDD +{ + public class RestaurantManagementSolver_Cook : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + { + if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; + + var cookwareTypePayload = targetPayloadSo as CookwareTypePayload; + + var evt = GameEvents.OpenPopupUiEvent; + //evt.UiType = typeof(CookUi); + //evt.Payload = cookwareTypePayload.CookwareType; + EventBus.Broadcast(evt); + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) + { + GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; + return currentGameFlowState == GameFlowState.RunRestaurant; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs.meta new file mode 100644 index 000000000..c8cc020bd --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Cook.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1ec01cfc3ad3d4e40ba166cf8049adb3 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Menu.cs index 4c4e3ab26..46ddfc86e 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 payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; var evt = GameEvents.OpenPopupUiEvent; evt.UiType = typeof(RestaurantManagementUi); @@ -14,8 +14,7 @@ public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable in return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = 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 fe7f96388..c3f18b42b 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver_Start.cs @@ -10,16 +10,15 @@ private RestaurantManagementState GetManagementState() return RestaurantState.Instance.ManagementState; } - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; _ = GameFlowManager.Instance.ChangeFlow(GameFlowState.RunRestaurant); return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { GameFlowState currentGameFlowState = GameFlowManager.Instance.GameFlowDataSo.CurrentGameState; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs index edee1940d..8b8f3a6ae 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Order.cs @@ -4,14 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Order : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = 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 c12a9ab2b..7965b8303 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs @@ -4,14 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Reserved : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs index 263c65494..a2732eb8c 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Serve.cs @@ -4,14 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Serve : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = 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 14f6f77d9..2596959bd 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -4,14 +4,13 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs index 6edbf5102..af3ce4124 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs @@ -18,17 +18,16 @@ private void Start() _solvers.Add(subsystemSolverType.Key, solver); } } - public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return TryGetSolver(interactable, out var solver) && - solver.ExecuteInteractionSubsystem(interactor, interactable, payloadSo); + solver.ExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo); } - public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return TryGetSolver(interactable, out var solver) && - solver.CanExecuteInteractionSubsystem(interactor, interactable, payloadSo); + solver.CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo); } // Solver를 가져오는 공통 로직 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 6459f8e33..ed8485fa0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8ae76b7c8f92890e759f46ff36b5db6b9e756533c8f14d3ef3ea41df7f4c5ad +oid sha256:f86abe14bf9fc4c7c93dfa96efd110ef0f56c3fb96a952c57e06a723fc87c352 size 1075