Compare commits

...

3 Commits

Author SHA1 Message Date
Jeonghyeon Ha
6c11c9e801 인터랙션 및 인터랙션 솔버 구조 작성 2025-07-22 20:15:20 +09:00
Jeonghyeon Ha
a54c3cec66 updated addressable 2025-07-22 19:07:52 +09:00
Jeonghyeon Ha
9992341492 GoogleSheetManager - NativeEnum 기능 추가 2025-07-22 19:07:14 +09:00
21 changed files with 399 additions and 273 deletions

View File

@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: 30e7f67fe9aaa7849a34c9b6e2bc53ae
m_currentHash:
serializedVersion: 2
Hash: 1aa2dadb5a0b5ea8574bcc44cb869c46
Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 1
m_CatalogRequestsTimeout: 0

View File

@ -1,6 +1,7 @@
fileFormatVersion: 2
guid: faf32fed979c86f44afa82f9114d8700
TextScriptImporter:
guid: 7ddc9a444b5824bcc9421fef5212845b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -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

View File

@ -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 { }
}

View File

@ -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);
}
}

View File

@ -1,157 +0,0 @@
{
"$개요": [
{
"": "시트 생성"
}
],
"ItemData": [
{
"Id": "식별번호",
"ItemType:Enum": "아이템타입"
},
{
"Id": "Item_Food_001",
"ItemType:Enum": "Food"
},
{
"Id": "Item_Environment_001",
"ItemType:Enum": "Environment"
},
{
"Id": "Item_Environment_002",
"ItemType:Enum": "Environment"
},
{
"Id": "Item_Environment_003",
"ItemType:Enum": "Environment"
},
{
"Id": "Item_Environment_004",
"ItemType:Enum": "Environment"
},
{
"Id": "Item_Environment_005",
"ItemType:Enum": "Environment"
}
],
"FoodData": [
{
"Id:string": "식별ID",
"Name:string": "이름",
"Cookware:Enum": "요리도구",
"Ingredient1:string": "재료1",
"Ingredient2:string": "재료2",
"Taste1:Taste_Enum": "맛1",
"Taste2:Taste_Enum": "맛2",
"SpriteKey:string": "SpriteAtlas 키 값"
},
{
"Id:string": "Item_Food_001",
"Name:string": "햇빛수프",
"Cookware:Enum": "Pot",
"Ingredient1:string": "극락쌀",
"Ingredient2:string": "햇빛당근",
"Taste1:Taste_Enum": "Bitter",
"Taste2:Taste_Enum": "Sweet",
"SpriteKey:string": "Gold"
},
{
"Id:string": "Item_Food_002",
"Name:string": "B",
"Cookware:Enum": "FryingPan",
"Ingredient1:string": 1,
"Ingredient2:string": 1,
"Taste1:Taste_Enum": "Spicy",
"Taste2:Taste_Enum": "Bitter",
"SpriteKey:string": ""
},
{
"Id:string": "Item_Food_003",
"Name:string": "C",
"Cookware:Enum": "Pot",
"Ingredient1:string": 2,
"Ingredient2:string": 2,
"Taste1:Taste_Enum": "Fresh",
"Taste2:Taste_Enum": "None",
"SpriteKey:string": ""
},
{
"Id:string": "Item_Food_004",
"Name:string": "D",
"Cookware:Enum": "Plating",
"Ingredient1:string": 3,
"Ingredient2:string": 3,
"Taste1:Taste_Enum": " ",
"Taste2:Taste_Enum": "Salty",
"SpriteKey:string": ""
}
],
"EnvironmentData": [
{
"Id": "식별번호",
"EnvironmentType:Enum": "오브젝트 타입",
"RendererType:Enum": "렌더러 타입",
"IsTrigger:int": "트리거 여부",
"SkeletonDataName:string": "스켈레톤 애니메이션 에셋 이름",
"SkinName:string": "스파인 스킨 이름",
"DefaultAnimationName:string": "",
"SpriteKey:string": "SpriteAtlas 키 값",
"Size:float": "유니티 내의 이미지 크기"
},
{
"Id": "Item_Environment_001",
"EnvironmentType:Enum": "Prop",
"RendererType:Enum": "Sprite",
"IsTrigger:int": 1,
"SkeletonDataName:string": "",
"SkinName:string": "",
"DefaultAnimationName:string": "",
"SpriteKey:string": "Barrel01",
"Size:float": 1
},
{
"Id": "Item_Environment_002",
"EnvironmentType:Enum": "Prop",
"RendererType:Enum": "Spine",
"IsTrigger:int": 1,
"SkeletonDataName:string": "Coral_SkeletonData",
"SkinName:string": "Coral01",
"DefaultAnimationName:string": "Coral01/Idle",
"SpriteKey:string": "",
"Size:float": 1
},
{
"Id": "Item_Environment_003",
"EnvironmentType:Enum": "Prop",
"RendererType:Enum": "Spine",
"IsTrigger:int": 1,
"SkeletonDataName:string": "Coral_SkeletonData",
"SkinName:string": "Coral02",
"DefaultAnimationName:string": "Coral02/Idle",
"SpriteKey:string": "",
"Size:float": 1
},
{
"Id": "Item_Environment_004",
"EnvironmentType:Enum": "Prop",
"RendererType:Enum": "Spine",
"IsTrigger:int": 1,
"SkeletonDataName:string": "SummerGrass01_SkeletonData",
"SkinName:string": "default",
"DefaultAnimationName:string": "Normal",
"SpriteKey:string": "",
"Size:float": 0.2
},
{
"Id": "Item_Environment_005",
"EnvironmentType:Enum": "Interactable",
"RendererType:Enum": "Spine",
"IsTrigger:int": 0,
"SkeletonDataName:string": "",
"SkinName:string": "",
"DefaultAnimationName:string": "",
"SpriteKey:string": "",
"Size:float": 1
}
]
}

View File

@ -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": "",

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 42c6cc66b5bf7734da0f1ab7002a6450
guid: e93a26e94066c4d3c9dca5a80cdb1652
TextScriptImporter:
externalObjects: {}
userData:

View File

@ -16,6 +16,10 @@ public class EnvironmentData : IId
[Tooltip("오브젝트 타입")]
public EnvironmentType EnvironmentType;
/// <summary>인터랙션타입</summary>
[Tooltip("인터랙션타입")]
public InteractionType InteractionType;
/// <summary>렌더러 타입</summary>
[Tooltip("렌더러 타입")]
public RendererType RendererType;

View File

@ -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": "",

View File

@ -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,89 +67,29 @@ 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
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
},\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
\"ItemType:Enum\": \"Environment\"\n },\n {\n \"Id\": \"Item_Environment_005\",\n
\"ItemType:Enum\": \"Environment\"\n }\n ],\n \"FoodData\": [\n {\n
\"Id:string\": \"\uC2DD\uBCC4ID\",\n \"Name:string\": \"\uC774\uB984\",\n
\"Cookware:Enum\": \"\uC694\uB9AC\uB3C4\uAD6C\",\n \"Ingredient1:string\":
\"\uC7AC\uB8CC1\",\n \"Ingredient2:string\": \"\uC7AC\uB8CC2\",\n
\"Taste1:Taste_Enum\": \"\uB9DB1\",\n \"Taste2:Taste_Enum\": \"\uB9DB2\",\n
\"SpriteKey:string\": \"SpriteAtlas \uD0A4 \uAC12\"\n },\n {\n \"Id:string\":
\"Item_Food_001\",\n \"Name:string\": \"\uD587\uBE5B\uC218\uD504\",\n
\"Cookware:Enum\": \"Pot\",\n \"Ingredient1:string\": \"\uADF9\uB77D\uC300\",\n
\"Ingredient2:string\": \"\uD587\uBE5B\uB2F9\uADFC\",\n \"Taste1:Taste_Enum\":
\"Bitter\",\n \"Taste2:Taste_Enum\": \"Sweet\",\n \"SpriteKey:string\":
\"Gold\"\n },\n {\n \"Id:string\": \"Item_Food_002\",\n \"Name:string\":
\"B\",\n \"Cookware:Enum\": \"FryingPan\",\n \"Ingredient1:string\":
1,\n \"Ingredient2:string\": 1,\n \"Taste1:Taste_Enum\": \"Spicy\",\n
\"Taste2:Taste_Enum\": \"Bitter\",\n \"SpriteKey:string\": \"\"\n },\n
{\n \"Id:string\": \"Item_Food_003\",\n \"Name:string\": \"C\",\n
\"Cookware:Enum\": \"Pot\",\n \"Ingredient1:string\": 2,\n \"Ingredient2:string\":
2,\n \"Taste1:Taste_Enum\": \"Fresh\",\n \"Taste2:Taste_Enum\": \"None\",\n
\"SpriteKey:string\": \"\"\n },\n {\n \"Id:string\": \"Item_Food_004\",\n
\"Name:string\": \"D\",\n \"Cookware:Enum\": \"Plating\",\n \"Ingredient1:string\":
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
\"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\":
\"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\": \"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\":
\"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.3\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}"
\"DefaultAnimationName:string\": \"\",\n \"SpriteKey:string\": \"\",\n
\"Size:float\": 1\n }\n ]\n}"
MaxLogs: 100

View File

@ -15,6 +15,7 @@ MonoBehaviour:
Datas:
- <Id>k__BackingField: Item_Environment_001
EnvironmentType: 1
InteractionType: 0
RendererType: 1
IsTrigger: 0
SkeletonDataName:
@ -24,6 +25,7 @@ MonoBehaviour:
Size: 1
- <Id>k__BackingField: Item_Environment_002
EnvironmentType: 1
InteractionType: 0
RendererType: 2
IsTrigger: 1
SkeletonDataName: Coral_SkeletonData
@ -33,6 +35,7 @@ MonoBehaviour:
Size: 1
- <Id>k__BackingField: Item_Environment_003
EnvironmentType: 1
InteractionType: 0
RendererType: 2
IsTrigger: 1
SkeletonDataName: Coral_SkeletonData
@ -42,6 +45,7 @@ MonoBehaviour:
Size: 1
- <Id>k__BackingField: Item_Environment_004
EnvironmentType: 1
InteractionType: 0
RendererType: 2
IsTrigger: 1
SkeletonDataName: SummerGrass01_SkeletonData
@ -51,6 +55,7 @@ MonoBehaviour:
Size: 0.3
- <Id>k__BackingField: Item_Environment_005
EnvironmentType: 2
InteractionType: 1
RendererType: 2
IsTrigger: 0
SkeletonDataName:

View File

@ -13,8 +13,34 @@ MonoBehaviour:
m_Name: ItemDataSo
m_EditorClassIdentifier:
Datas:
- <Id>k__BackingField: Item_Food_001
- <Id>k__BackingField: item_food_001
ItemType: 1
- <Id>k__BackingField: item_food_002
ItemType: 1
- <Id>k__BackingField: item_food_003
ItemType: 1
- <Id>k__BackingField: item_food_004
ItemType: 1
- <Id>k__BackingField: item_food_005
ItemType: 1
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField:
ItemType: 0
- <Id>k__BackingField: Item_Environment_001
ItemType: 2
- <Id>k__BackingField: Item_Environment_002

View File

@ -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<bool> 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(':');

View File

@ -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;
}
}
}

View File

@ -0,0 +1,23 @@
using DDD.RestaurantEvent;
using UnityEngine;
namespace DDD
{
public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler<RestaurantInteractionEvent>
{
private void Start()
{
EventBus.Register(this);
}
public void Invoke(RestaurantInteractionEvent evt)
{
// TODO : 이벤트결과를 보고 할 일이 있다면 여기서 뭔가 처리. 기본적으로 이벤트에서 이미 인터페이스로 인터랙션 처리됨
}
public GameObject GetInteractorGameObject()
{
return TODO_IMPLEMENT_ME;
}
}
}

View File

@ -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

View File

@ -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<RestaurantInteractionComponent>();
interactionComponent.InitializeInteraction(environmentData.InteractionType);
}
}
}
}

View File

@ -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;
}
}
}

View File

@ -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<InteractionType, Type> 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<IInteractor>();
// 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;
}
}
}

View File

@ -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();
}
}
}