Class Wallet
Static helper class for dealing with the Wallet inventory.
Many methods are simply shortcuts for 'InventoryManager.wallet.xxx'.
Namespace: UnityEngine .GameFoundation
Assembly: solution.dll
Syntax
public static class Wallet
Properties
Name | Description |
---|---|
definition | The InventoryDefinition of this Wallet. Determines the default InventoryItems and quantities. |
definition |
Helper property for easily accessing the Wallet's InventoryDefinition Hash. |
definition |
Helper property for easily accessing the Id of the Wallet's InventoryDefinition. |
on |
This is a callback that will be invoked whenever an InventoryItem is added to the Wallet. |
on |
Callback for when an InventoryItem quantity has changed. |
on |
This is a callback that will be invoked whenever an InventoryItem is removed from the Wallet. |
Methods
Name | Description |
---|---|
Add |
Adds more of the specified InventoryItemDefinition by Hash. Returns the new (or existing) InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing reference when to the InventoryItem when the InventoryItem was already in the Wallet. |
Add |
Adds a new entry of the specified InventoryItemDefinition by Id. Returns the new or existing InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing InventoryItem when the InventoryItem was already in the Wallet. |
Add |
Adds more of the specified InventoryItemDefinition. Returns the new (or existing) InventoryItem. Returns the new InventoryItem when the InventoryItem didn't already exist in the Wallet and returns an existing reference when to the InventoryItem when the InventoryItem was already in the Wallet. |
Contains |
Returns whether or not an InventoryItem exists within the Wallet. |
Contains |
Returns whether or not an InventoryItem exists within the Wallet. |
Contains |
Returns whether or not an InventoryItem exists within the Wallet for specified InventoryItemDefinition. |
Get |
Gets an InventoryItem by InventoryItemDefinition Hash if it is contained within, otherwise returns null. |
Get |
Gets an InventoryItem by InventoryItemDefinition reference if it is contained within, otherwise returns null. |
Get |
Returns an array of all items within the wallet. |
Get |
Fills the given list with all items found in the wallet. |
Get |
This will return an array of all InventoryItems that have the given Category by CategoryDefinition id hash. |
Get |
Fills the given list with items with the given category hash. |
Get |
Returns all an array of items in the wallet with the given category id. |
Get |
Fills the given list with items with the given category id. |
Get |
This will return all InventoryItems that have the given Category through an array. |
Get |
Fills the given list with items with the given category. |
Get |
Gets the Quantity of an InventoryItem by its InventoryItemDefinition hash |
Get |
Gets the Quantity of an InventoryItem by its InventoryItemDefinition id |
Get |
Gets the Quantity of an InventoryItem by its reference |
Remove |
Removes all InventoryItems from the Wallet. |
Remove |
Removes an entry of the specified InventoryItemefinition by Hash. |
Remove |
Removes an entry of the specified InventoryItem by InventoryItemDefintion id. |
Remove |
This will remove all InventoryItems that have the given Category by CategoryDefinition Hash. |
Remove |
This will remove all InventoryItems that have the given Category by CategoryDefinition Id. |
Remove |
This will remove all InventoryItems that have the given Category. |
Reset() | Resets the contents of the Wallet. |
Set |
Sets the quantity of the InventoryItem within this Wallet of the specified InventoryItemDefinition by Hash |
Set |
Sets the quantity of an InventoryItem by InventoryItemDefinition Id. |
Set |
Sets the quantity of an InventoryItem. |