public static void ItemAddedToInventory(Item item, int slotIndex) { if (OnItemAddedToInventory != null) { OnItemAddedToInventory.Invoke(item, slotIndex); } }
public void fireAddItemToInventoryEvent(ItemObject item, PlayerController player) { /*if (!subscripInitialized.Contains(item)) * { * item.subscribeToEvents(); * subscripInitialized.Add(item); * }*/ OnItemAddedToInventory?.Invoke(this, new OnItemAddedToInventoryArgs { item = item, playerRef = player }); }
public void InvokeItemAddedToInventory(ItemObject itemObject) { Debug.Log("Item Added To Inventory"); OnItemAddedToInventory.Invoke(itemObject); }
private void Add(InventoryItem inventoryItem) { items.Add(inventoryItem); OnItemAddedToInventory?.Invoke(inventoryItem); }