This class handles the display of the items in an inventory and will trigger the various things you can do with an item (equip, use, etc.)
More...
|
virtual void | DrawIcon (InventoryItem item, int index) |
| If there's an item in this slot, draws its icon inside. More...
|
|
virtual void | SetIcon (Sprite newSprite) |
|
virtual void | SetQuantity (int quantity) |
|
virtual void | DisableIconAndQuantity () |
|
override void | OnSelect (BaseEventData eventData) |
| When that slot gets selected (via a mouse over or a touch), triggers an event for other classes to act on More...
|
|
virtual void | SlotClicked () |
| When that slot gets clicked, triggers an event for other classes to act on More...
|
|
virtual void | Move () |
| Selects the item in this slot for a movement, or moves the currently selected one to that slot This will also swap both objects if possible More...
|
|
virtual void | Use () |
| Consume one unity of the item in this slot, triggering a sound and whatever behaviour has been defined for this item being used More...
|
|
virtual void | Equip () |
| Equip this item if possible. More...
|
|
virtual void | UnEquip () |
| Unequip this item if possible. More...
|
|
virtual void | Drop () |
| Drops this item. More...
|
|
virtual void | DisableSlot () |
| Disables the slot. More...
|
|
virtual void | EnableSlot () |
| Enables the slot. More...
|
|
virtual bool | Equippable () |
| Returns true if the item at this slot can be equipped, false otherwise More...
|
|
virtual bool | Usable () |
| Returns true if the item at this slot can be used, false otherwise More...
|
|
virtual bool | Movable () |
| Returns true if the item at this slot can be dropped, false otherwise More...
|
|
virtual bool | Droppable () |
| Returns true if the item at this slot can be dropped, false otherwise More...
|
|
virtual bool | Unequippable () |
| Returns true if the item at this slot can be dropped, false otherwise More...
|
|
virtual bool | EquipUseButtonShouldShow () |
|
virtual bool | MoveButtonShouldShow () |
|
virtual bool | DropButtonShouldShow () |
|
virtual bool | EquipButtonShouldShow () |
|
virtual bool | UseButtonShouldShow () |
|
virtual bool | UnequipButtonShouldShow () |
|
|
override void | Awake () |
|
override void | Start () |
| On Start, we start listening to click events on that slot More...
|
|
This class handles the display of the items in an inventory and will trigger the various things you can do with an item (equip, use, etc.)
◆ Awake()
override void MoreMountains.InventoryEngine.InventorySlot.Awake |
( |
| ) |
|
|
protected |
◆ DisableIconAndQuantity()
virtual void MoreMountains.InventoryEngine.InventorySlot.DisableIconAndQuantity |
( |
| ) |
|
|
virtual |
◆ DisableSlot()
virtual void MoreMountains.InventoryEngine.InventorySlot.DisableSlot |
( |
| ) |
|
|
virtual |
◆ DrawIcon()
virtual void MoreMountains.InventoryEngine.InventorySlot.DrawIcon |
( |
InventoryItem |
item, |
|
|
int |
index |
|
) |
| |
|
virtual |
If there's an item in this slot, draws its icon inside.
- Parameters
-
◆ Drop()
virtual void MoreMountains.InventoryEngine.InventorySlot.Drop |
( |
| ) |
|
|
virtual |
◆ DropButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.DropButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ Droppable()
virtual bool MoreMountains.InventoryEngine.InventorySlot.Droppable |
( |
| ) |
|
|
virtual |
Returns true if the item at this slot can be dropped, false otherwise
◆ EnableSlot()
virtual void MoreMountains.InventoryEngine.InventorySlot.EnableSlot |
( |
| ) |
|
|
virtual |
◆ Equip()
virtual void MoreMountains.InventoryEngine.InventorySlot.Equip |
( |
| ) |
|
|
virtual |
Equip this item if possible.
◆ EquipButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.EquipButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ Equippable()
virtual bool MoreMountains.InventoryEngine.InventorySlot.Equippable |
( |
| ) |
|
|
virtual |
Returns true if the item at this slot can be equipped, false otherwise
◆ EquipUseButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.EquipUseButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ Movable()
virtual bool MoreMountains.InventoryEngine.InventorySlot.Movable |
( |
| ) |
|
|
virtual |
Returns true if the item at this slot can be dropped, false otherwise
◆ Move()
virtual void MoreMountains.InventoryEngine.InventorySlot.Move |
( |
| ) |
|
|
virtual |
Selects the item in this slot for a movement, or moves the currently selected one to that slot This will also swap both objects if possible
◆ MoveButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.MoveButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ OnSelect()
override void MoreMountains.InventoryEngine.InventorySlot.OnSelect |
( |
BaseEventData |
eventData | ) |
|
When that slot gets selected (via a mouse over or a touch), triggers an event for other classes to act on
- Parameters
-
◆ SetIcon()
virtual void MoreMountains.InventoryEngine.InventorySlot.SetIcon |
( |
Sprite |
newSprite | ) |
|
|
virtual |
◆ SetQuantity()
virtual void MoreMountains.InventoryEngine.InventorySlot.SetQuantity |
( |
int |
quantity | ) |
|
|
virtual |
◆ SlotClicked()
virtual void MoreMountains.InventoryEngine.InventorySlot.SlotClicked |
( |
| ) |
|
|
virtual |
When that slot gets clicked, triggers an event for other classes to act on
◆ Start()
override void MoreMountains.InventoryEngine.InventorySlot.Start |
( |
| ) |
|
|
protected |
On Start, we start listening to click events on that slot
◆ UnEquip()
virtual void MoreMountains.InventoryEngine.InventorySlot.UnEquip |
( |
| ) |
|
|
virtual |
Unequip this item if possible.
◆ UnequipButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.UnequipButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ Unequippable()
virtual bool MoreMountains.InventoryEngine.InventorySlot.Unequippable |
( |
| ) |
|
|
virtual |
Returns true if the item at this slot can be dropped, false otherwise
◆ Usable()
virtual bool MoreMountains.InventoryEngine.InventorySlot.Usable |
( |
| ) |
|
|
virtual |
Returns true if the item at this slot can be used, false otherwise
◆ Use()
virtual void MoreMountains.InventoryEngine.InventorySlot.Use |
( |
| ) |
|
|
virtual |
Consume one unity of the item in this slot, triggering a sound and whatever behaviour has been defined for this item being used
◆ UseButtonShouldShow()
virtual bool MoreMountains.InventoryEngine.InventorySlot.UseButtonShouldShow |
( |
| ) |
|
|
virtual |
◆ _disabledAlpha
const float MoreMountains.InventoryEngine.InventorySlot._disabledAlpha = 0.5f |
|
staticprotected |
◆ _enabledAlpha
const float MoreMountains.InventoryEngine.InventorySlot._enabledAlpha = 1.0f |
|
staticprotected |
◆ IconImage
Image MoreMountains.InventoryEngine.InventorySlot.IconImage |
◆ IconRectTransform
RectTransform MoreMountains.InventoryEngine.InventorySlot.IconRectTransform |
◆ Index
int MoreMountains.InventoryEngine.InventorySlot.Index |
the slot's index (its position in the inventory array)
◆ MovedSprite
Sprite MoreMountains.InventoryEngine.InventorySlot.MovedSprite |
the sprite used as a background for the slot while an item is being moved
◆ ParentInventoryDisplay
InventoryDisplay MoreMountains.InventoryEngine.InventorySlot.ParentInventoryDisplay |
the inventory display this slot belongs to
◆ QuantityText
Text MoreMountains.InventoryEngine.InventorySlot.QuantityText |
◆ SlotEnabled
bool MoreMountains.InventoryEngine.InventorySlot.SlotEnabled =true |
whether or not this slot is currently enabled and can be interacted with
◆ TargetCanvasGroup
CanvasGroup MoreMountains.InventoryEngine.InventorySlot.TargetCanvasGroup |
◆ TargetImage
Image MoreMountains.InventoryEngine.InventorySlot.TargetImage |
◆ TargetRectTransform
RectTransform MoreMountains.InventoryEngine.InventorySlot.TargetRectTransform |
◆ CurrentItem
InventoryItem MoreMountains.InventoryEngine.InventorySlot.CurrentItem |
|
get |
The documentation for this class was generated from the following file:
- Assets/CorgiEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventorySlot.cs