Use this class to display the total quantity of one or more given items in one or more given inventories.
More...
|
| void | UpdateText () |
| | A public method used to update the target text with the total quantity of the item(s) in the target inventories.
|
| virtual void | OnMMEvent (MMInventoryEvent inventoryEvent) |
| | Handles inventory events, updates the text if needed.
|
| virtual int | ComputeQuantity () |
| | Computes the quantity of the item in the target inventories.
|
| virtual bool | ShouldUpdate (string inventoryName) |
| | Returns true if the inventory name passed in parameters is one of the target inventories, false otherwise.
|
| void | OnMMEvent (T eventType) |
|
| virtual void | OnEnable () |
| | On Enable, we start listening for MMInventoryEvents.
|
| virtual void | OnDisable () |
| | On Disable, we stop listening for MMInventoryEvents.
|
Use this class to display the total quantity of one or more given items in one or more given inventories.
◆ ComputeQuantity()
| virtual int MoreMountains.InventoryEngine.InventoryCounterDisplay.ComputeQuantity |
( |
| ) |
|
|
virtual |
Computes the quantity of the item in the target inventories.
- Returns
◆ OnDisable()
| virtual void MoreMountains.InventoryEngine.InventoryCounterDisplay.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On Disable, we stop listening for MMInventoryEvents.
◆ OnEnable()
| virtual void MoreMountains.InventoryEngine.InventoryCounterDisplay.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On Enable, we start listening for MMInventoryEvents.
◆ OnMMEvent()
| virtual void MoreMountains.InventoryEngine.InventoryCounterDisplay.OnMMEvent |
( |
MMInventoryEvent | inventoryEvent | ) |
|
|
virtual |
Handles inventory events, updates the text if needed.
- Parameters
-
◆ ShouldUpdate()
| virtual bool MoreMountains.InventoryEngine.InventoryCounterDisplay.ShouldUpdate |
( |
string | inventoryName | ) |
|
|
virtual |
Returns true if the inventory name passed in parameters is one of the target inventories, false otherwise.
- Parameters
-
- Returns
◆ UpdateText()
| void MoreMountains.InventoryEngine.InventoryCounterDisplay.UpdateText |
( |
| ) |
|
A public method used to update the target text with the total quantity of the item(s) in the target inventories.
◆ DisplayFormat
| string MoreMountains.InventoryEngine.InventoryCounterDisplay.DisplayFormat = "0" |
the format to apply to the text
◆ Item
| List<InventoryItem> MoreMountains.InventoryEngine.InventoryCounterDisplay.Item |
a list of the items to count
◆ TargetInventories
| List<Inventory> MoreMountains.InventoryEngine.InventoryCounterDisplay.TargetInventories |
the inventories in which to count the items
◆ TargetText
| Text MoreMountains.InventoryEngine.InventoryCounterDisplay.TargetText |
the text UI to update with the total quantity of the item(s) in the target inventories
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryCounterDisplay.cs