Compare commits

...

2 Commits

Author SHA1 Message Date
NTG_Lenovo
ddf744ade4 메타 데이터 추가 2025-07-22 12:38:56 +09:00
NTG_Lenovo
02c675ed3f 이벤트 정적 호출 변경 및 폴더 이동 2025-07-22 12:38:48 +09:00
7 changed files with 16 additions and 7 deletions

View File

@ -19,4 +19,5 @@ MonoBehaviour:
- {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3} - {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3}
- {fileID: 622422277636247943, guid: d95124918e5a4a246abb0d378b14d3fa, type: 3} - {fileID: 622422277636247943, guid: d95124918e5a4a246abb0d378b14d3fa, type: 3}
- {fileID: 5136368050551183548, guid: 0aa6654feb91ef040b8b99d4f64688fc, type: 3} - {fileID: 5136368050551183548, guid: 0aa6654feb91ef040b8b99d4f64688fc, type: 3}
- {fileID: 5539371897028506726, guid: 21cff8c1505cd8041a474795e35e0192, type: 3}
- {fileID: 8500549904376788358, guid: d81cf4649bf54485a8b0da7a235f3817, type: 3} - {fileID: 8500549904376788358, guid: d81cf4649bf54485a8b0da7a235f3817, type: 3}

View File

@ -4,7 +4,8 @@ namespace DDD
{ {
public static class GameEvents public static class GameEvents
{ {
public static InteractionEvent Interaction = new InteractionEvent(); public static InventoryChangedEvent InventoryChangedEvent = new();
public static InteractionEvent Interaction = new();
} }
public static class RestaurantEvents public static class RestaurantEvents
{ {
@ -21,8 +22,5 @@ public class InteractionEvent : IEvent
public GameObject Target; public GameObject Target;
} }
public class InventoryChangedEvent : IEvent public class InventoryChangedEvent : IEvent { }
{
}
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 46b89f8970a04e14b97419aeb4acb6c4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -55,7 +55,8 @@ public bool AddItem(string id, int quantity = 1)
_inventoryItemDatas[id] = new InventoryItemData(id, quantity); _inventoryItemDatas[id] = new InventoryItemData(id, quantity);
} }
EventBus.Broadcast(new InventoryChangedEvent()); InventoryChangedEvent evt = GameEvents.InventoryChangedEvent;
EventBus.Broadcast(evt);
return true; return true;
} }
@ -81,7 +82,8 @@ public bool RemoveItem(string id, int quantity = 1)
_inventoryItemDatas.Remove(id); _inventoryItemDatas.Remove(id);
} }
EventBus.Broadcast(new InventoryChangedEvent()); InventoryChangedEvent evt = GameEvents.InventoryChangedEvent;
EventBus.Broadcast(evt);
return true; return true;
} }