|
| GameObject | Effect |
| | The effect to instantiate when the coin is hit.
|
| AudioClip | PickSfx |
| | The sound effect to play when the object gets picked.
|
| InventoryItem | Item |
| | the item that should be picked
|
| int | Quantity = 1 |
| | the initial quantity of that item that should be added to the inventory when picked
|
| int | RemainingQuantity = 1 |
| | the current quantity of that item that should be added to the inventory when picked
|
| bool | PickableIfInventoryIsFull = false |
| | if you set this to true, a character will be able to pick this item even if its inventory is full
|
| bool | DisableObjectWhenDepleted = false |
| | if you set this to true, the object will be disabled when picked
|
| bool | RequirePlayerTag = true |
| | if this is true, this object will only be allowed to be picked by colliders with a Player tag
|
|
| virtual void | ResetQuantity () |
| | Resets the remaining quantity to the initial quantity.
|
| virtual void | OnTriggerEnter (Collider collider) |
| | Triggered when something collides with the picker.
|
| virtual void | OnTriggerEnter2D (Collider2D collider) |
| | Triggered when something collides with the picker.
|
| virtual void | Pick () |
| | Picks this item and adds it to its target inventory.
|
| virtual void | Pick (string targetInventoryName, string playerID="Player1") |
| | Picks this item and adds it to the target inventory specified as a parameter.
|
| virtual bool | Pickable () |
| | Returns true if this item can be picked, false otherwise.
|
| virtual void | FindTargetInventory (string targetInventoryName, string playerID="Player1") |
| | Finds the target inventory based on its name.
|
| int | _pickedQuantity = 0 |
| Inventory | _targetInventory |
An item picker that instantiates an effect and plays a sound on pick.