TopDown Engine
v3.6
|
An item picker that instantiates an effect and plays a sound on pick More...
Public Attributes | |
GameObject | Effect |
The effect to instantiate when the coin is hit. More... | |
AudioClip | PickSfx |
The sound effect to play when the object gets picked. More... | |
Public Attributes inherited from MoreMountains.InventoryEngine.ItemPicker | |
InventoryItem | Item |
the item that should be picked More... | |
int | Quantity = 1 |
the initial quantity of that item that should be added to the inventory when picked More... | |
int | RemainingQuantity = 1 |
the current quantity of that item that should be added to the inventory when picked More... | |
bool | PickableIfInventoryIsFull = false |
if you set this to true, a character will be able to pick this item even if its inventory is full More... | |
bool | DisableObjectWhenDepleted = false |
if you set this to true, the object will be disabled when picked More... | |
bool | RequirePlayerTag = true |
if this is true, this object will only be allowed to be picked by colliders with a Player tag More... | |
Protected Member Functions | |
override void | PickSuccess () |
Describes what happens when the object is successfully picked More... | |
virtual void | Effects () |
Triggers the various pick effects More... | |
Protected Member Functions inherited from MoreMountains.InventoryEngine.ItemPicker | |
virtual void | Start () |
On Start we initialize our item picker More... | |
virtual void | Initialization () |
On Init we look for our target inventory More... | |
virtual void | PickFail () |
Describes what happens when the object fails to get picked (inventory full, usually) More... | |
virtual void | DisableObjectIfNeeded () |
Disables the object if needed. More... | |
virtual void | DetermineMaxQuantity () |
Determines the max quantity of item that can be picked from this More... | |
Additional Inherited Members | |
Public Member Functions inherited from MoreMountains.InventoryEngine.ItemPicker | |
virtual void | ResetQuantity () |
Resets the remaining quantity to the initial quantity More... | |
virtual void | OnTriggerEnter (Collider collider) |
Triggered when something collides with the picker More... | |
virtual void | OnTriggerEnter2D (Collider2D collider) |
Triggered when something collides with the picker More... | |
virtual void | Pick () |
Picks this item and adds it to its target inventory More... | |
virtual void | Pick (string targetInventoryName, string playerID="Player1") |
Picks this item and adds it to the target inventory specified as a parameter More... | |
virtual bool | Pickable () |
Returns true if this item can be picked, false otherwise More... | |
virtual void | FindTargetInventory (string targetInventoryName, string playerID="Player1") |
Finds the target inventory based on its name More... | |
Protected Attributes inherited from MoreMountains.InventoryEngine.ItemPicker | |
int | _pickedQuantity = 0 |
Inventory | _targetInventory |
An item picker that instantiates an effect and plays a sound on pick
|
protectedvirtual |
Triggers the various pick effects
|
protectedvirtual |
Describes what happens when the object is successfully picked
Reimplemented from MoreMountains.InventoryEngine.ItemPicker.
GameObject MoreMountains.TopDownEngine.InventoryPickableItem.Effect |
The effect to instantiate when the coin is hit.
AudioClip MoreMountains.TopDownEngine.InventoryPickableItem.PickSfx |
The sound effect to play when the object gets picked.