Interface IInventoryController
Interface for inventory controllers, managing activation and slot swapping logic for a character's inventory. Extends character behaviour and item container functionality.
public interface IInventoryController : ICharacterBehaviour, IItemContainer
- Inherited Members
Methods
Activate(int)
Activates the item in the specified inventory slot, typically triggering its use effect.
void Activate(int index)
Parameters
indexintThe inventory slot index to activate.
CanSwapItemSlots(int, int, InventoryType)
Determines if two item slots can be swapped, preventing invalid swaps (e.g., same slot).
bool CanSwapItemSlots(int from, int to, InventoryType fromInventory)
Parameters
fromintThe source slot index.
tointThe destination slot index.
fromInventoryInventoryTypeThe inventory type of the source slot.
Returns
- bool
True if the slots can be swapped, false otherwise.