diff --git a/Assets/AddressableAssetsData/OSX.meta b/Assets/AddressableAssetsData/OSX.meta new file mode 100644 index 000000000..ff4aa3a8e --- /dev/null +++ b/Assets/AddressableAssetsData/OSX.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ddc9a444b5824bcc9421fef5212845b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity index 77b28c697..fe7d60799 100644 --- a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity +++ b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity @@ -4216,7 +4216,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6289760680591803305, guid: 05aeb8078f8dc7c489b71a0ce5bc4fac, type: 3} propertyPath: _editorName - value: "\uB0A8\uD0DC\uAC74" + value: "\uD558\uC815\uD604" objectReference: {fileID: 0} - target: {fileID: 6289760680591803305, guid: 05aeb8078f8dc7c489b71a0ce5bc4fac, type: 3} propertyPath: _currentVersion diff --git a/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs b/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs index bf7a57eff..5cd0cdf67 100644 --- a/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs +++ b/Assets/_DDD/_Scripts/GameEvent/GameEvents.cs @@ -12,15 +12,10 @@ public static class GameEvents public static OpenPopupUiEvent OpenPopupUiEvent = new(); public static ClosePopupUiEvent ClosePopupUiEvent = new(); public static ShowGlobalMessageEvent RequestShowGlobalMessageEvent = new(); - public static InteractionEvent Interaction = new(); + public static InventoryChangedEvent InventoryChangedEvent = new(); } - // public static class RestaurantEvents - // { - // // Some events... - // } - // public static class VoyageEvents // { // // Some events... @@ -65,11 +60,5 @@ public class ClosePopupUiEvent : IEvent public Type UiType; } - public class InteractionEvent : IEvent - { - public GameObject Causer; - public GameObject Target; - } - public class InventoryChangedEvent : IEvent { } } diff --git a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs index 996cc1b1c..aea4ee1c7 100644 --- a/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs +++ b/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs @@ -5,15 +5,25 @@ namespace DDD { public enum InteractionType { - Default + None, + RestaurantManagement, + Count } public interface IInteractable { bool CanInteract(); - void OnInteracted(IInteractor interactor); + bool OnInteracted(IInteractor interactor, ScriptableObject interactionPayloadSo = null); + InteractionType GetInteractionType(); + GameObject GetInteractableGameObject(); + void InitializeInteraction(InteractionType interactionType); } public interface IInteractor { - void TryInteract(InteractionType interactionType); + GameObject GetInteractorGameObject(); + } + + public interface IInteractionSolver + { + bool ExecuteInteraction(IInteractor interactor, ScriptableObject interactionPayloadSo = null); } } diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json similarity index 78% rename from Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json rename to Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json index 79d7e8fd2..c6539c575 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json @@ -10,8 +10,60 @@ "ItemType:Enum": "아이템타입" }, { - "Id": "Item_Food_001", - "ItemType:Enum": "Food" + "Id": "item_food_001", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_002", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_003", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_004", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_005", + "ItemType:Enum": "food" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" }, { "Id": "Item_Environment_001", @@ -90,6 +142,7 @@ { "Id": "식별번호", "EnvironmentType:Enum": "오브젝트 타입", + "InteractionType:NativeEnum": "인터랙션타입", "RendererType:Enum": "렌더러 타입", "IsTrigger:int": "트리거 여부", "SkeletonDataName:string": "스켈레톤 애니메이션 에셋 이름", @@ -101,6 +154,7 @@ { "Id": "Item_Environment_001", "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Sprite", "IsTrigger:int": 0, "SkeletonDataName:string": "", @@ -112,6 +166,7 @@ { "Id": "Item_Environment_002", "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -123,6 +178,7 @@ { "Id": "Item_Environment_003", "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -134,6 +190,7 @@ { "Id": "Item_Environment_004", "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "SummerGrass01_SkeletonData", @@ -145,6 +202,7 @@ { "Id": "Item_Environment_005", "EnvironmentType:Enum": "Interactable", + "InteractionType:NativeEnum": "RestaurantManagement", "RendererType:Enum": "Spine", "IsTrigger:int": 0, "SkeletonDataName:string": "", diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json.meta b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json.meta similarity index 75% rename from Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json.meta rename to Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json.meta index 87618254f..a841c8f50 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json.meta +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-03-24 by 하정현.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 42c6cc66b5bf7734da0f1ab7002a6450 +guid: e93a26e94066c4d3c9dca5a80cdb1652 TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json similarity index 76% rename from Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json rename to Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json index c08a9eeaa..e5ee10900 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 13-28-42 by 남태건.json +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json @@ -10,8 +10,60 @@ "ItemType:Enum": "아이템타입" }, { - "Id": "Item_Food_001", - "ItemType:Enum": "Food" + "Id": "item_food_001", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_002", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_003", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_004", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_005", + "ItemType:Enum": "food" + }, + { + "Id": " ", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" }, { "Id": "Item_Environment_001", @@ -89,7 +141,7 @@ "EnvironmentData": [ { "Id": "식별번호", - "EnvironmentType:Enum": "오브젝트 타입", + "InteractionType:NativeEnum": "인터랙션타입", "RendererType:Enum": "렌더러 타입", "IsTrigger:int": "트리거 여부", "SkeletonDataName:string": "스켈레톤 애니메이션 에셋 이름", @@ -100,9 +152,9 @@ }, { "Id": "Item_Environment_001", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Sprite", - "IsTrigger:int": 1, + "IsTrigger:int": 0, "SkeletonDataName:string": "", "SkinName:string": "", "DefaultAnimationName:string": "", @@ -111,7 +163,7 @@ }, { "Id": "Item_Environment_002", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -122,7 +174,7 @@ }, { "Id": "Item_Environment_003", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -133,18 +185,18 @@ }, { "Id": "Item_Environment_004", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "SummerGrass01_SkeletonData", "SkinName:string": "default", "DefaultAnimationName:string": "Normal", "SpriteKey:string": "", - "Size:float": 0.2 + "Size:float": 0.3 }, { "Id": "Item_Environment_005", - "EnvironmentType:Enum": "Interactable", + "InteractionType:NativeEnum": "RestaurantManagement", "RendererType:Enum": "Spine", "IsTrigger:int": 0, "SkeletonDataName:string": "", diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json.meta b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json.meta similarity index 75% rename from Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json.meta rename to Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json.meta index 1f60a8068..28437315e 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-16 17-22-35 by 남태건.json.meta +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-07-22 19-10-23 by 하정현.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: faf32fed979c86f44afa82f9114d8700 +guid: 133467af6c54d44bc8d9195493c44dfc TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Classes/EnvironmentData.cs b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Classes/EnvironmentData.cs index 19d1b197d..2169d3349 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Classes/EnvironmentData.cs +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Classes/EnvironmentData.cs @@ -12,9 +12,9 @@ public class EnvironmentData : IId [field: SerializeField] public string Id { get; set; } - /// 오브젝트 타입 - [Tooltip("오브젝트 타입")] - public EnvironmentType EnvironmentType; + /// 인터랙션타입 + [Tooltip("인터랙션타입")] + public InteractionType InteractionType; /// 렌더러 타입 [Tooltip("렌더러 타입")] diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs index d5d9d4cec..5a69d3d66 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs @@ -29,13 +29,6 @@ public enum Taste Salty = 6, } - public enum EnvironmentType - { - None = 0, - Prop = 1, - Interactable = 2, - } - public enum RendererType { None = 0, diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json index 79d7e8fd2..e5ee10900 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json @@ -10,8 +10,60 @@ "ItemType:Enum": "아이템타입" }, { - "Id": "Item_Food_001", - "ItemType:Enum": "Food" + "Id": "item_food_001", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_002", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_003", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_004", + "ItemType:Enum": "food" + }, + { + "Id": "item_food_005", + "ItemType:Enum": "food" + }, + { + "Id": " ", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" + }, + { + "Id": "", + "ItemType:Enum": "" }, { "Id": "Item_Environment_001", @@ -89,7 +141,7 @@ "EnvironmentData": [ { "Id": "식별번호", - "EnvironmentType:Enum": "오브젝트 타입", + "InteractionType:NativeEnum": "인터랙션타입", "RendererType:Enum": "렌더러 타입", "IsTrigger:int": "트리거 여부", "SkeletonDataName:string": "스켈레톤 애니메이션 에셋 이름", @@ -100,7 +152,7 @@ }, { "Id": "Item_Environment_001", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Sprite", "IsTrigger:int": 0, "SkeletonDataName:string": "", @@ -111,7 +163,7 @@ }, { "Id": "Item_Environment_002", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -122,7 +174,7 @@ }, { "Id": "Item_Environment_003", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "Coral_SkeletonData", @@ -133,7 +185,7 @@ }, { "Id": "Item_Environment_004", - "EnvironmentType:Enum": "Prop", + "InteractionType:NativeEnum": "None", "RendererType:Enum": "Spine", "IsTrigger:int": 1, "SkeletonDataName:string": "SummerGrass01_SkeletonData", @@ -144,7 +196,7 @@ }, { "Id": "Item_Environment_005", - "EnvironmentType:Enum": "Interactable", + "InteractionType:NativeEnum": "RestaurantManagement", "RendererType:Enum": "Spine", "IsTrigger:int": 0, "SkeletonDataName:string": "", diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset index e13c26064..4e050861c 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset @@ -13,13 +13,25 @@ MonoBehaviour: m_Name: GoogleSheetChangeLog m_EditorClassIdentifier: _logs: - - Editor: "\uB0A8\uD0DC\uAC74" - Timestamp: 2025-07-16 13:28:42 + - Editor: "\uD558\uC815\uD604" + Timestamp: 2025-07-22 19:03:24 JsonSnapshot: "{\n \"$\uAC1C\uC694\": [\n {\n \"\": \"\uC2DC\uD2B8 \uC0DD\uC131\"\n }\n ],\n \"ItemData\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n \"ItemType:Enum\": \"\uC544\uC774\uD15C\uD0C0\uC785\"\n },\n {\n - \"Id\": \"Item_Food_001\",\n \"ItemType:Enum\": \"Food\"\n },\n - {\n \"Id\": \"Item_Environment_001\",\n \"ItemType:Enum\": \"Environment\"\n + \"Id\": \"item_food_001\",\n \"ItemType:Enum\": \"food\"\n },\n + {\n \"Id\": \"item_food_002\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_003\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_004\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_005\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n + {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n + \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": + \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": \"\",\n + \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": + \"\"\n },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n + },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n + {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n + \"Id\": \"Item_Environment_001\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_002\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_003\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_004\",\n @@ -47,6 +59,7 @@ MonoBehaviour: \"Taste2:Taste_Enum\": \"Salty\",\n \"SpriteKey:string\": \"\"\n }\n ],\n \"EnvironmentData\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n \"EnvironmentType:Enum\": \"\uC624\uBE0C\uC81D\uD2B8 \uD0C0\uC785\",\n + \"InteractionType:NativeEnum\": \"\uC778\uD130\uB799\uC158\uD0C0\uC785\",\n \"RendererType:Enum\": \"\uB80C\uB354\uB7EC \uD0C0\uC785\",\n \"IsTrigger:int\": \"\uD2B8\uB9AC\uAC70 \uC5EC\uBD80\",\n \"SkeletonDataName:string\": \"\uC2A4\uCF08\uB808\uD1A4 \uC560\uB2C8\uBA54\uC774\uC158 \uC5D0\uC14B \uC774\uB984\",\n \"SkinName:string\": @@ -54,35 +67,50 @@ MonoBehaviour: \"\",\n \"SpriteKey:string\": \"SpriteAtlas \uD0A4 \uAC12\",\n \"Size:float\": \"\uC720\uB2C8\uD2F0 \uB0B4\uC758 \uC774\uBBF8\uC9C0 \uD06C\uAE30\"\n },\n {\n \"Id\": \"Item_Environment_001\",\n \"EnvironmentType:Enum\": - \"Prop\",\n \"RendererType:Enum\": \"Sprite\",\n \"IsTrigger:int\": - 1,\n \"SkeletonDataName:string\": \"\",\n \"SkinName:string\": \"\",\n - \"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"Barrel01\",\n - \"Size:float\": 1\n },\n {\n \"Id\": \"Item_Environment_002\",\n - \"EnvironmentType:Enum\": \"Prop\",\n \"RendererType:Enum\": \"Spine\",\n - \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": \"Coral_SkeletonData\",\n - \"SkinName:string\": \"Coral01\",\n \"DefaultAnimationName:string\": \"Coral01/Idle\",\n - \"SpriteKey:string\": \"\",\n \"Size:float\": 1\n },\n {\n - \"Id\": \"Item_Environment_003\",\n \"EnvironmentType:Enum\": \"Prop\",\n - \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": + \"Prop\",\n \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": + \"Sprite\",\n \"IsTrigger:int\": 0,\n \"SkeletonDataName:string\": + \"\",\n \"SkinName:string\": \"\",\n \"DefaultAnimationName:string\": + \"\",\n \"SpriteKey:string\": \"Barrel01\",\n \"Size:float\": 1\n + },\n {\n \"Id\": \"Item_Environment_002\",\n \"EnvironmentType:Enum\": + \"Prop\",\n \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": + \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": + \"Coral_SkeletonData\",\n \"SkinName:string\": \"Coral01\",\n \"DefaultAnimationName:string\": + \"Coral01/Idle\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": + 1\n },\n {\n \"Id\": \"Item_Environment_003\",\n \"EnvironmentType:Enum\": + \"Prop\",\n \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": + \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": \"Coral_SkeletonData\",\n \"SkinName:string\": \"Coral02\",\n \"DefaultAnimationName:string\": \"Coral02/Idle\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": 1\n },\n {\n \"Id\": \"Item_Environment_004\",\n \"EnvironmentType:Enum\": - \"Prop\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": - 1,\n \"SkeletonDataName:string\": \"SummerGrass01_SkeletonData\",\n - \"SkinName:string\": \"default\",\n \"DefaultAnimationName:string\": \"Normal\",\n - \"SpriteKey:string\": \"\",\n \"Size:float\": 0.2\n },\n {\n - \"Id\": \"Item_Environment_005\",\n \"EnvironmentType:Enum\": \"Interactable\",\n - \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 0,\n \"SkeletonDataName:string\": - \"\",\n \"SkinName:string\": \"\",\n \"DefaultAnimationName:string\": - \"\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": 1\n }\n - ]\n}" - - Editor: "\uB0A8\uD0DC\uAC74" - Timestamp: 2025-07-16 17:22:35 + \"Prop\",\n \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": + \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": + \"SummerGrass01_SkeletonData\",\n \"SkinName:string\": \"default\",\n + \"DefaultAnimationName:string\": \"Normal\",\n \"SpriteKey:string\": \"\",\n + \"Size:float\": 0.3\n },\n {\n \"Id\": \"Item_Environment_005\",\n + \"EnvironmentType:Enum\": \"Interactable\",\n \"InteractionType:NativeEnum\": + \"RestaurantManagement\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": + 0,\n \"SkeletonDataName:string\": \"\",\n \"SkinName:string\": \"\",\n + \"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"\",\n + \"Size:float\": 1\n }\n ]\n}" + - Editor: "\uD558\uC815\uD604" + Timestamp: 2025-07-22 19:10:23 JsonSnapshot: "{\n \"$\uAC1C\uC694\": [\n {\n \"\": \"\uC2DC\uD2B8 \uC0DD\uC131\"\n }\n ],\n \"ItemData\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n \"ItemType:Enum\": \"\uC544\uC774\uD15C\uD0C0\uC785\"\n },\n {\n - \"Id\": \"Item_Food_001\",\n \"ItemType:Enum\": \"Food\"\n },\n - {\n \"Id\": \"Item_Environment_001\",\n \"ItemType:Enum\": \"Environment\"\n + \"Id\": \"item_food_001\",\n \"ItemType:Enum\": \"food\"\n },\n + {\n \"Id\": \"item_food_002\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_003\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_004\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \"item_food_005\",\n \"ItemType:Enum\": \"food\"\n + },\n {\n \"Id\": \" \",\n \"ItemType:Enum\": \"\"\n },\n + {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n + \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": + \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": \"\",\n + \"ItemType:Enum\": \"\"\n },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": + \"\"\n },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n + },\n {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n + {\n \"Id\": \"\",\n \"ItemType:Enum\": \"\"\n },\n {\n + \"Id\": \"Item_Environment_001\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_002\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_003\",\n \"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_004\",\n @@ -109,32 +137,32 @@ MonoBehaviour: 3,\n \"Ingredient2:string\": 3,\n \"Taste1:Taste_Enum\": \" \",\n \"Taste2:Taste_Enum\": \"Salty\",\n \"SpriteKey:string\": \"\"\n }\n ],\n \"EnvironmentData\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n - \"EnvironmentType:Enum\": \"\uC624\uBE0C\uC81D\uD2B8 \uD0C0\uC785\",\n + \"InteractionType:NativeEnum\": \"\uC778\uD130\uB799\uC158\uD0C0\uC785\",\n \"RendererType:Enum\": \"\uB80C\uB354\uB7EC \uD0C0\uC785\",\n \"IsTrigger:int\": \"\uD2B8\uB9AC\uAC70 \uC5EC\uBD80\",\n \"SkeletonDataName:string\": \"\uC2A4\uCF08\uB808\uD1A4 \uC560\uB2C8\uBA54\uC774\uC158 \uC5D0\uC14B \uC774\uB984\",\n \"SkinName:string\": \"\uC2A4\uD30C\uC778 \uC2A4\uD0A8 \uC774\uB984\",\n \"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"SpriteAtlas \uD0A4 \uAC12\",\n \"Size:float\": \"\uC720\uB2C8\uD2F0 \uB0B4\uC758 \uC774\uBBF8\uC9C0 \uD06C\uAE30\"\n },\n - {\n \"Id\": \"Item_Environment_001\",\n \"EnvironmentType:Enum\": - \"Prop\",\n \"RendererType:Enum\": \"Sprite\",\n \"IsTrigger:int\": + {\n \"Id\": \"Item_Environment_001\",\n \"InteractionType:NativeEnum\": + \"None\",\n \"RendererType:Enum\": \"Sprite\",\n \"IsTrigger:int\": 0,\n \"SkeletonDataName:string\": \"\",\n \"SkinName:string\": \"\",\n \"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"Barrel01\",\n \"Size:float\": 1\n },\n {\n \"Id\": \"Item_Environment_002\",\n - \"EnvironmentType:Enum\": \"Prop\",\n \"RendererType:Enum\": \"Spine\",\n + \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": \"Coral_SkeletonData\",\n \"SkinName:string\": \"Coral01\",\n \"DefaultAnimationName:string\": \"Coral01/Idle\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": 1\n },\n {\n - \"Id\": \"Item_Environment_003\",\n \"EnvironmentType:Enum\": \"Prop\",\n + \"Id\": \"Item_Environment_003\",\n \"InteractionType:NativeEnum\": \"None\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": \"Coral_SkeletonData\",\n \"SkinName:string\": \"Coral02\",\n \"DefaultAnimationName:string\": \"Coral02/Idle\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": - 1\n },\n {\n \"Id\": \"Item_Environment_004\",\n \"EnvironmentType:Enum\": - \"Prop\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": + 1\n },\n {\n \"Id\": \"Item_Environment_004\",\n \"InteractionType:NativeEnum\": + \"None\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 1,\n \"SkeletonDataName:string\": \"SummerGrass01_SkeletonData\",\n \"SkinName:string\": \"default\",\n \"DefaultAnimationName:string\": \"Normal\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": 0.3\n },\n {\n - \"Id\": \"Item_Environment_005\",\n \"EnvironmentType:Enum\": \"Interactable\",\n + \"Id\": \"Item_Environment_005\",\n \"InteractionType:NativeEnum\": \"RestaurantManagement\",\n \"RendererType:Enum\": \"Spine\",\n \"IsTrigger:int\": 0,\n \"SkeletonDataName:string\": \"\",\n \"SkinName:string\": \"\",\n \"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"\",\n \"Size:float\": 1\n }\n diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset index 8a78ec073..c76a8c85f 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset @@ -14,7 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: Datas: - k__BackingField: Item_Environment_001 - EnvironmentType: 1 + InteractionType: 0 RendererType: 1 IsTrigger: 0 SkeletonDataName: @@ -23,7 +23,7 @@ MonoBehaviour: SpriteKey: Barrel01 Size: 1 - k__BackingField: Item_Environment_002 - EnvironmentType: 1 + InteractionType: 0 RendererType: 2 IsTrigger: 1 SkeletonDataName: Coral_SkeletonData @@ -32,7 +32,7 @@ MonoBehaviour: SpriteKey: Size: 1 - k__BackingField: Item_Environment_003 - EnvironmentType: 1 + InteractionType: 0 RendererType: 2 IsTrigger: 1 SkeletonDataName: Coral_SkeletonData @@ -41,7 +41,7 @@ MonoBehaviour: SpriteKey: Size: 1 - k__BackingField: Item_Environment_004 - EnvironmentType: 1 + InteractionType: 0 RendererType: 2 IsTrigger: 1 SkeletonDataName: SummerGrass01_SkeletonData @@ -50,7 +50,7 @@ MonoBehaviour: SpriteKey: Size: 0.3 - k__BackingField: Item_Environment_005 - EnvironmentType: 2 + InteractionType: 1 RendererType: 2 IsTrigger: 0 SkeletonDataName: diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/ItemDataSo.asset b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/ItemDataSo.asset index 59a9fb112..cf1a43351 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/ItemDataSo.asset +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/ItemDataSo.asset @@ -13,8 +13,34 @@ MonoBehaviour: m_Name: ItemDataSo m_EditorClassIdentifier: Datas: - - k__BackingField: Item_Food_001 + - k__BackingField: item_food_001 ItemType: 1 + - k__BackingField: item_food_002 + ItemType: 1 + - k__BackingField: item_food_003 + ItemType: 1 + - k__BackingField: item_food_004 + ItemType: 1 + - k__BackingField: item_food_005 + ItemType: 1 + - k__BackingField: ' ' + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 + - k__BackingField: + ItemType: 0 - k__BackingField: Item_Environment_001 ItemType: 2 - k__BackingField: Item_Environment_002 diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs b/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs index 4dcb0dd34..e82c86284 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs @@ -377,6 +377,10 @@ private void GenerateClassFilesPerSheet(string jsonInput) { enumType = rawName.Split(':')[1].Replace("_Enum", ""); } + else if (rawName.Contains(":NativeEnum")) + { + continue; + } if (!string.IsNullOrEmpty(enumType)) { @@ -501,6 +505,11 @@ private string GenerateDataClassCode(string className, JArray items) fieldName = parts[0]; explicitType = parts[1].Replace("_Enum", ""); } + else if (rawName.Contains(":NativeEnum")) + { + fieldName = rawName.Split(':')[0]; + explicitType = fieldName; + } else if (rawName.Contains(":")) { var parts = rawName.Split(':'); @@ -674,6 +683,11 @@ private async Task InternalCreateGoogleSheetSoAsync() fieldName = parts[0]; explicitType = parts[1].Replace("_Enum", ""); } + else if (rawName.Contains(":NativeEnum")) + { + fieldName = rawName.Split(':')[0]; + explicitType = fieldName; + } else if (rawName.Contains(":")) { var parts = rawName.Split(':'); diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs index 6132a124e..ea0117ab7 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacter.cs @@ -1,9 +1,29 @@ +using DDD.RestaurantEvent; using NUnit.Framework; using UnityEngine; namespace DDD { - public class RestaurantCharacter : MonoBehaviour, IGameCharacter + public class RestaurantCharacter : MonoBehaviour, IGameCharacter, IInteractor { + private void Start() + { + TODO_IMPLEMENT_ME(); + // TODO : Add event solvers dynamically + for (int i = (int)InteractionType.Count; i < (int)InteractionType.Count; i++) + { + InteractionType interactionType = (InteractionType)i; + // TODO : if this character should handle the interaction? + if(RestaurantEventSolvers.TypeToSolver.TryGetValue(interactionType, out var solverType)) + { + gameObject.AddComponent(solverType); + } + } + } + + public GameObject GetInteractorGameObject() + { + return TODO_IMPLEMENT_ME; + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs new file mode 100644 index 000000000..7b1db33be --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs @@ -0,0 +1,23 @@ +using DDD.RestaurantEvent; +using UnityEngine; + +namespace DDD +{ + public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler + { + private void Start() + { + EventBus.Register(this); + } + + public void Invoke(RestaurantInteractionEvent evt) + { + // TODO : 이벤트결과를 보고 할 일이 있다면 여기서 뭔가 처리. 기본적으로 이벤트에서 이미 인터페이스로 인터랙션 처리됨 + } + + public GameObject GetInteractorGameObject() + { + return TODO_IMPLEMENT_ME; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs.meta new file mode 100644 index 000000000..fe233a2f7 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/RestaurantCharacterInteraction.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c9a5f5b2cb6745238a931b4d52f5d57a +timeCreated: 1753180605 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantController/RestaurantController.cs b/Assets/_DDD/_Scripts/RestaurantController/RestaurantController.cs index b7e5afb10..8ae2f2757 100644 --- a/Assets/_DDD/_Scripts/RestaurantController/RestaurantController.cs +++ b/Assets/_DDD/_Scripts/RestaurantController/RestaurantController.cs @@ -42,11 +42,6 @@ private void GenerateDummyEnvironmentProps() // Make dummy placement data foreach (EnvironmentData prop in DataManager.Instance.EnvironmentDataSo.GetDataList()) { - if (prop.EnvironmentType != EnvironmentType.Prop) - { - continue; - } - for (int i = 0; i < 10; i++) { // Make random position diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs index 21d5a7152..4c90905f8 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/RestaurantEnvironment.cs @@ -1,3 +1,4 @@ +using DDD.RestaurantEvent; using Spine.Unity; using Unity.VisualScripting; using UnityEngine; @@ -50,6 +51,13 @@ public async void Initialize(RestaurantEnvironmentData data) transform.position = new Vector3(data.Position.x, 0f, data.Position.y); transform.localScale = Vector3.one * environmentData.Size; + + // Interaction initialize + if (environmentData.InteractionType != InteractionType.None) + { + var interactionComponent = transform.AddComponent(); + interactionComponent.InitializeInteraction(environmentData.InteractionType); + } } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent.meta b/Assets/_DDD/_Scripts/RestaurantEvent.meta new file mode 100644 index 000000000..7bffba2b1 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 59bb7a352dea4d16a49b21c9f0742f95 +timeCreated: 1753177057 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs new file mode 100644 index 000000000..bf7c596b8 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace DDD.RestaurantEvent +{ + public class RestaurantManagementEventSolver : MonoBehaviour, IInteractionSolver + { + public bool ExecuteInteraction(IInteractor interactor, ScriptableObject interactionPayloadSo = null) + { + return TODO_IMPLEMENT_ME; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs.meta new file mode 100644 index 000000000..df52fe940 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEventSolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d64af507b15b4c5abe4de65714818938 +timeCreated: 1753179809 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs new file mode 100644 index 000000000..d7bc45625 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace DDD.RestaurantEvent +{ + public static class RestaurantEvents + { + public static RestaurantInteractionEvent RestaurantInteraction = new(); + } + + public static class RestaurantEventSolvers + { + public static Dictionary TypeToSolver = new() + { + {InteractionType.RestaurantManagement, typeof(RestaurantManagementEventSolver)} + }; + } + + public class RestaurantInteractionEvent : IEvent + { + public GameObject Causer; + public GameObject Target; + public InteractionType InteractionType; + public ScriptableObject InteractionPayloadSo; + public bool eventResult = false; + + public RestaurantInteractionEvent MakeInteractionEvent(GameObject causer, GameObject target, InteractionType interactionType, + ScriptableObject interactionPayloadSo) + { + Causer = causer; + Target = target; + return this; + } + + public bool RequestInteraction(GameObject causer, GameObject target, InteractionType interactionType, ScriptableObject interactionPayloadSo = null, bool shouldBroadcastAfterSolve = true) + { + if (interactionType == InteractionType.None) + { + return false; + } + + var evt = MakeInteractionEvent(causer, target, interactionType, interactionPayloadSo); + evt.eventResult = false; + // Solve event directly. 이벤트 처리는 여기서 하고, 이벤트 호출로는 이런 이벤트가 호출되었고 결과가 어떻다는 거 전파하는 식으로. + if (RestaurantEventSolvers.TypeToSolver.TryGetValue(interactionType, out var solverType)) + { + Component solverComponent = target.GetComponent(solverType); + IInteractionSolver solver = solverComponent as IInteractionSolver; + IInteractor interactor = causer.GetComponent(); + + // Cast solverComponent to IInteractable + if (solver is not null && interactor is not null) + { + evt.eventResult = solver.ExecuteInteraction(interactor, interactionPayloadSo); + } + else + { + // Should not reach here! + Debug.Assert(false, "Solver Component or Interactor is null"); + } + } + + EventBus.Broadcast(evt);// 이벤트 결과를 이거 받아서 처리하면 될듯. + return evt.eventResult; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs.meta new file mode 100644 index 000000000..1e7d05bce --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantEvents.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7299ebb246fe4cf987675310605774b5 +timeCreated: 1753177179 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs new file mode 100644 index 000000000..782ae7ce1 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -0,0 +1,39 @@ +using UnityEngine; + +namespace DDD.RestaurantEvent +{ + public class RestaurantInteractionComponent : MonoBehaviour, IInteractable + { + public bool CanInteract() + { + return true; + } + + public bool OnInteracted(IInteractor interactor, ScriptableObject interactionPayloadSo = null) + { + if (CanInteract() == false) + { + return false; + } + + bool interactionResult = RestaurantEvents.RestaurantInteraction.RequestInteraction(interactor.GetInteractorGameObject(), + GetInteractableGameObject(), GetInteractionType(), interactionPayloadSo, true); + return interactionResult; + } + + public InteractionType GetInteractionType() + { + return TODO_IMPLEMENT_ME; + } + + public GameObject GetInteractableGameObject() + { + return TODO_IMPLEMENT_ME; + } + + public void InitializeInteraction(InteractionType interactionType) + { + TODO_IMPLEMENT_ME(); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs.meta new file mode 100644 index 000000000..b592d8d8c --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 201f9e6d7ca7404baa9945950292a392 +timeCreated: 1753181678 \ No newline at end of file