Class SwitchItem<TargetItem>
A type of item that switch to another item when use
Implements
Type Parameters
Name | Description |
---|---|
TargetItem | The item it will switch to |
Constructors
SwitchItem()
Declaration
public SwitchItem()
Properties
MaxStackCount
Count limitation for multiple items inside one inventory slot
Declaration
public override int MaxStackCount { get; }
Overrides
TargetID
ID of the item it will switch to
Declaration
public int TargetID { get; init; }
Methods
CanUse(Character)
True if this item can be use at current frame
Declaration
public override bool CanUse(Character character)
Overrides
Use(Character, int, int, out bool)
Perform the logic when the item get used
Declaration
public override bool Use(Character character, int inventoryID, int itemIndex, out bool consume)
Inventory ID of this holder
Index of this item inside the inventory
True if the item should disappear after being used
Returns
Type | Description |
---|---|
bool | True if the item is used |