Add this component to an object so it can be picked and added to an inventory
More...
|
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...
|
|
Add this component to an object so it can be picked and added to an inventory
◆ DetermineMaxQuantity()
virtual void MoreMountains.InventoryEngine.ItemPicker.DetermineMaxQuantity |
( |
| ) |
|
|
protectedvirtual |
Determines the max quantity of item that can be picked from this
◆ DisableObjectIfNeeded()
virtual void MoreMountains.InventoryEngine.ItemPicker.DisableObjectIfNeeded |
( |
| ) |
|
|
protectedvirtual |
Disables the object if needed.
◆ FindTargetInventory()
virtual void MoreMountains.InventoryEngine.ItemPicker.FindTargetInventory |
( |
string |
targetInventoryName, |
|
|
string |
playerID = "Player1" |
|
) |
| |
|
virtual |
Finds the target inventory based on its name
- Parameters
-
targetInventoryName | Target inventory name. |
◆ Initialization()
virtual void MoreMountains.InventoryEngine.ItemPicker.Initialization |
( |
| ) |
|
|
protectedvirtual |
On Init we look for our target inventory
◆ OnTriggerEnter()
virtual void MoreMountains.InventoryEngine.ItemPicker.OnTriggerEnter |
( |
Collider |
collider | ) |
|
|
virtual |
Triggered when something collides with the picker
- Parameters
-
◆ OnTriggerEnter2D()
virtual void MoreMountains.InventoryEngine.ItemPicker.OnTriggerEnter2D |
( |
Collider2D |
collider | ) |
|
|
virtual |
Triggered when something collides with the picker
- Parameters
-
◆ Pick() [1/2]
virtual void MoreMountains.InventoryEngine.ItemPicker.Pick |
( |
| ) |
|
|
virtual |
Picks this item and adds it to its target inventory
◆ Pick() [2/2]
virtual void MoreMountains.InventoryEngine.ItemPicker.Pick |
( |
string |
targetInventoryName, |
|
|
string |
playerID = "Player1" |
|
) |
| |
|
virtual |
Picks this item and adds it to the target inventory specified as a parameter
- Parameters
-
targetInventoryName | Target inventory name. |
◆ Pickable()
virtual bool MoreMountains.InventoryEngine.ItemPicker.Pickable |
( |
| ) |
|
|
virtual |
Returns true if this item can be picked, false otherwise
◆ PickFail()
virtual void MoreMountains.InventoryEngine.ItemPicker.PickFail |
( |
| ) |
|
|
protectedvirtual |
Describes what happens when the object fails to get picked (inventory full, usually)
◆ PickSuccess()
virtual void MoreMountains.InventoryEngine.ItemPicker.PickSuccess |
( |
| ) |
|
|
protectedvirtual |
◆ ResetQuantity()
virtual void MoreMountains.InventoryEngine.ItemPicker.ResetQuantity |
( |
| ) |
|
|
virtual |
Resets the remaining quantity to the initial quantity
◆ Start()
virtual void MoreMountains.InventoryEngine.ItemPicker.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our item picker
◆ _pickedQuantity
int MoreMountains.InventoryEngine.ItemPicker._pickedQuantity = 0 |
|
protected |
◆ _targetInventory
Inventory MoreMountains.InventoryEngine.ItemPicker._targetInventory |
|
protected |
◆ DisableObjectWhenDepleted
bool MoreMountains.InventoryEngine.ItemPicker.DisableObjectWhenDepleted = false |
if you set this to true, the object will be disabled when picked
◆ Item
the item that should be picked
◆ PickableIfInventoryIsFull
bool MoreMountains.InventoryEngine.ItemPicker.PickableIfInventoryIsFull = false |
if you set this to true, a character will be able to pick this item even if its inventory is full
◆ Quantity
int MoreMountains.InventoryEngine.ItemPicker.Quantity = 1 |
the initial quantity of that item that should be added to the inventory when picked
◆ RemainingQuantity
int MoreMountains.InventoryEngine.ItemPicker.RemainingQuantity = 1 |
the current quantity of that item that should be added to the inventory when picked
◆ RequirePlayerTag
bool MoreMountains.InventoryEngine.ItemPicker.RequirePlayerTag = true |
if this is true, this object will only be allowed to be picked by colliders with a Player tag
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/Core/ItemPicker.cs