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

Detailed Description

special InstantiatingItemSlot for PrefabItems that contain an action at their root
the owner of the action is set on equip and input is forwarded from the slot to the action

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

Inheritance diagram for AdventureCore.ActionItemSlot:
AdventureCore.InstantiatingItemSlot AdventureCore.ItemSlot< PrefabItem >

Public Member Functions

virtual void Input (InputAction.CallbackContext callbackContext)
 sends input to the action on the current equipment instance
 
virtual void StartAction ()
 starts the action on the current equipment instance
 
void ForceAction (bool jumpStart=false)
 starts the action on the current equipment instance
convenience method for inspector events that calls StartAction(bool, bool) with force=true
 
void JumpStartAction (bool force=false)
 starts the action on the current equipment instance
convenience method for inspector events that calls StartAction(bool, bool) with jumpStart=true
 
virtual void StartAction (bool jumpStart, bool force)
 starts the action on the current equipment instance
 
- Public Member Functions inherited from AdventureCore.ItemSlot< PrefabItem >
override void Initialize (CharacterBase character)
 
override bool CanEquip (InventoryItem inventoryItem, bool clear=true)
 checks if an inventory item can be equipped
 
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
 

Protected Member Functions

override void equip (PrefabItem item)
 
override void unequip (PrefabItem item)
 
- Protected Member Functions inherited from AdventureCore.InstantiatingItemSlot
override void equip (PrefabItem item)
 
override void unequip (PrefabItem item)
 
override void applyVisibility ()
 
- Protected Member Functions inherited from AdventureCore.ItemSlot< PrefabItem >
override void onIsHiddenChanged ()
 
virtual bool canEquip (T item)
 
virtual void equip (T item)
 
virtual void unequip (T item)
 

Additional Inherited Members

- Public Attributes inherited from AdventureCore.InstantiatingItemSlot
Transform Parent
 
- Public Attributes inherited from AdventureCore.ItemSlot< PrefabItem >
FallbackItem
 
- Protected Attributes inherited from AdventureCore.InstantiatingItemSlot
Transform _instance
 
- Properties inherited from AdventureCore.ItemSlot< PrefabItem >
EquippedItem [get]
 
override Type ItemType [get]
 

Member Function Documentation

◆ ForceAction()

void AdventureCore.ActionItemSlot.ForceAction ( bool jumpStart = false)

starts the action on the current equipment instance
convenience method for inspector events that calls StartAction(bool, bool) with force=true

Parameters
jumpStart

◆ Input()

virtual void AdventureCore.ActionItemSlot.Input ( InputAction.CallbackContext callbackContext)
inlinevirtual

sends input to the action on the current equipment instance

Parameters
callbackContext

◆ JumpStartAction()

void AdventureCore.ActionItemSlot.JumpStartAction ( bool force = false)

starts the action on the current equipment instance
convenience method for inspector events that calls StartAction(bool, bool) with jumpStart=true

Parameters
force

◆ StartAction()

virtual void AdventureCore.ActionItemSlot.StartAction ( bool jumpStart,
bool force )
inlinevirtual

starts the action on the current equipment instance

Parameters
jumpStart
force