Class StackableInventoryItemSample
This class manages the scene and serves as an example for stackable inventory items.
Inherited Members
Namespace: UnityEngine.GameFoundation.Sample
Syntax
public class StackableInventoryItemSample : MonoBehaviour
Fields
decreaseQuantityButton
Declaration
public Button decreaseQuantityButton
Field Value
Type | Description |
---|---|
Button |
increaseQuantityButton
References to the remove buttons to enable/disable when the action is not possible.
Declaration
public Button increaseQuantityButton
Field Value
Type | Description |
---|---|
Button |
mainText
We will need a reference to the main text box in the scene so we can easily modify it.
Declaration
public Text mainText
Field Value
Type | Description |
---|---|
Text |
wrongDatabasePanel
Reference to the panel to display when the wrong database is in use.
Declaration
public GameObject wrongDatabasePanel
Field Value
Type | Description |
---|---|
GameObject |
zeroQuantityButton
Declaration
public Button zeroQuantityButton
Field Value
Type | Description |
---|---|
Button |
Methods
DecreaseQuantity()
Decreases quantity of stackable health potions.
Declaration
public void DecreaseQuantity()
IncreaseQuantity()
Increases stack quantity of health potions.
Declaration
public void IncreaseQuantity()
ZeroQuantity()
Resets quantity of stackable health potions to 0.
Declaration
public void ZeroQuantity()