IWieldableInventoryCC
This interface manages the selection and handling of wieldable items within a character's inventory. It inherits from ICharacterComponent
and includes the following properties and methods:
SelectedIndex: Gets the current index of the selected wieldable item.
PreviousIndex: Gets the index of the previously selected wieldable item.
SelectedIndexChanged: Event that is raised whenever the selected index changes, allowing subscribers to react to the change.
SelectAtIndex(int index): Equips the wieldable item at the specified index. This updates the selected index to the new value.
DropWieldable(bool forceDrop = false): Drops the currently selected wieldable item into the game world. The
forceDrop
parameter determines whether the item should be dropped regardless of other conditions (e.g., when equipping a different wieldable).GetWieldableWithId(int id): Retrieves a wieldable instance or prefab associated with the specified identifier.
GetWieldableInstanceWithId(int id): Retrieves or instantiates a new wieldable instance from a prefab using the specified identifier.
Last updated