Loading...
Searching...
No Matches
AdventureCore.ItemSlotProxy Class Reference

Detailed Description

special slot that redirects to one of a number of other slots
the actual slot currently being used can be rotated through using NextSlot and PreviousSlot

https://adventure.softleitner.com/manual/item

Inheritance diagram for AdventureCore.ItemSlotProxy:
AdventureCore.ItemSlotBase AdventureSouls.SoulsUsableSlots

Public Member Functions

override void Initialize (CharacterBase character)
 
override void Equip (InventoryItem inventoryItem)
 equips an inventory item(if another item is already equipped it is unequipped first)
 
override void Clear ()
 clears the slot of its currently equipped item
 
override void Show ()
 shows the slot if it was hidden before
 
override void Hide ()
 hides the slot
 
override bool CanUse (int quantity=1)
 checks if the equipped item can be used
 
override void Use (int quantity=1)
 uses the equipped item
 
virtual void NextSlot ()
 
virtual void PreviousSlot ()
 
- Public Member Functions inherited from AdventureCore.ItemSlotBase
virtual bool CanEquipPrevious (bool clear=true)
 checks if the slot can switch its equipped item to the previous one in its characters inventory
 
virtual bool EquipPrevious (bool clear=true)
 equips the previous item in its characters inventory
 
virtual bool CanEquipNext (bool clear=true)
 checks if the slot can switch its equipped item to the next one in its characters inventory
 
virtual bool EquipNext (bool clear=true)
 equips the next item in its characters inventory
 
virtual bool CanEquip (InventoryItem inventoryItem, bool clear=true)
 checks if an inventory item can be equipped
 
virtual bool CanClear ()
 checks whether the slot can be cleared of its equipped items
 

Public Attributes

ItemSlotBase[] Slots
 
- Public Attributes inherited from AdventureCore.ItemSlotBase
string Key
 
ItemSlotCategory Category
 
int Index
 

Properties

ItemSlotBase CurrentSlot [get]
 
override InventoryItem EquippedInventoryItem [get]
 
override bool IsInUse [get, set]
 
override Type ItemType [get]
 
- Properties inherited from AdventureCore.ItemSlotBase
virtual InventoryItem EquippedInventoryItem [get]
 
bool IsHidden [get]
 
virtual bool IsInUse [get, set]
 
Type ItemType [get]
 
CharacterBase Character [get]
 

Additional Inherited Members

- Protected Member Functions inherited from AdventureCore.ItemSlotBase
virtual InventoryItem getPrevious (bool clear=true)
 
virtual InventoryItem getNext (bool clear=true)
 
virtual void onEquippedInventoryItemChanged ()
 
virtual void onIsInUseChanged ()
 
virtual void onIsHiddenChanged ()
 
- Events inherited from AdventureCore.ItemSlotBase
Action< bool > IsInUseChanged
 
Action< bool > IsHiddenChanged
 
Action< InventoryItemEquippedInventoryItemChanged
 

Member Function Documentation

◆ CanUse()

override bool AdventureCore.ItemSlotProxy.CanUse ( int quantity = 1)
virtual

checks if the equipped item can be used

Parameters
quantityhow many of the item to use
Returns
true if the equipped item can be used

Reimplemented from AdventureCore.ItemSlotBase.

◆ Clear()

override void AdventureCore.ItemSlotProxy.Clear ( )
virtual

clears the slot of its currently equipped item

Reimplemented from AdventureCore.ItemSlotBase.

◆ Equip()

override void AdventureCore.ItemSlotProxy.Equip ( InventoryItem inventoryItem)
virtual

equips an inventory item(if another item is already equipped it is unequipped first)

Parameters
inventoryItemthe inventory item to equip

Reimplemented from AdventureCore.ItemSlotBase.

◆ Hide()

override void AdventureCore.ItemSlotProxy.Hide ( )
virtual

hides the slot

Reimplemented from AdventureCore.ItemSlotBase.

◆ Initialize()

override void AdventureCore.ItemSlotProxy.Initialize ( CharacterBase character)
inlinevirtual

Reimplemented from AdventureCore.ItemSlotBase.

◆ Show()

override void AdventureCore.ItemSlotProxy.Show ( )
virtual

shows the slot if it was hidden before

Reimplemented from AdventureCore.ItemSlotBase.

◆ Use()

override void AdventureCore.ItemSlotProxy.Use ( int quantity = 1)
virtual

uses the equipped item

Parameters
quantityhow many to use

Reimplemented from AdventureCore.ItemSlotBase.