Loading...
Searching...
No Matches
AdventureCore.InventoryItem Class Reference

Detailed Description

serializable utility class used in inventories to keep track of item quantity and the slot it is equipped to
manages some of the plumbing between item and slot
should only be created by an inventory, if you need to show items quantities in the inspector use ItemQuantity

Inheritance diagram for AdventureCore.InventoryItem:
AdventureCore.TiledInventoryItem

Classes

struct  InventoryItemData
 

Public Member Functions

 InventoryItem (ItemQuantity itemQuantity)
 
 InventoryItem (ItemBase item)
 
 InventoryItem (ItemBase item, int quantity)
 
 InventoryItem (ItemBase item, int quantity, ItemValue[] values)
 
string GetStringValue (string key, string defaultValue)
 
int GetIntValue (string key, int defaultValue)
 
float GetFloatValue (string key, float defaultValue)
 
bool GetBoolValue (string key, bool defaultValue)
 
virtual bool CheckValue (string key)
 
virtual T GetValue< T > (string key, T defaultValue)
 
ItemQuantity GetItemQuantity ()
 
InventoryItemData GetData ()
 
virtual void OnQuantityChanged ()
 
override string ToString ()
 

Public Attributes

ItemBase Item
 
int Quantity
 
ItemSlotBase EquippedSlot
 
ItemValue[] Values
 

Events

Action< ItemSlotBaseEquippedSlotChanged
 
Action< int > QuantityChanged
 
Action< string > ValueChanged