Class InventoryWithQuantitySample
This class manages the scene and serves as an example for inventory basics.
Inherited Members
Namespace: UnityEngine.GameFoundation.Sample
Syntax
public class InventoryWithQuantitySample : MonoBehaviour
Fields
addAppleButton
References to the remove buttons to enable/disable when the action is not possible.
Declaration
public Button addAppleButton
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 |
removeAllApplesButton
Declaration
public Button removeAllApplesButton
Field Value
Type | Description |
---|---|
Button |
removeAppleButton
Declaration
public Button removeAppleButton
Field Value
Type | Description |
---|---|
Button |
wrongDatabasePanel
Reference to the panel to display when the wrong database is in use.
Declaration
public GameObject wrongDatabasePanel
Field Value
Type | Description |
---|---|
GameObject |
Methods
AddApple()
Adds a single apple to the GameFoundationSdk.inventory.
Declaration
public void AddApple()
RemoveAllApples()
Removes all instances of apple InventoryItemDefinition from the Inventory.
Declaration
public void RemoveAllApples()
RemoveApple()
Removes a single apple from the main inventory.
Declaration
public void RemoveApple()