이벤트 정적 호출 변경 및 폴더 이동

This commit is contained in:
NTG_Lenovo 2025-07-22 12:38:48 +09:00
parent cc0459eb33
commit 02c675ed3f
3 changed files with 7 additions and 7 deletions

View File

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

View File

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