Class PlayerMenuItem<UI>
A type of item that spawns a player partner menu when use
Implements
Type Parameters
Name | Description |
---|---|
UI | What type of menu does it spawns |
Constructors
PlayerMenuItem()
Declaration
public PlayerMenuItem()
Properties
Column
Inventory column count of the menu
Declaration
protected abstract int Column { get; }
MaxStackCount
Count limitation for multiple items inside one inventory slot
Declaration
public override int MaxStackCount { get; }
Overrides
Row
Inventory row count of the menu
Declaration
protected abstract int Row { get; }
Methods
CanUse(Character)
True if this item can be use at current frame
Declaration
public override bool CanUse(Character character)
Overrides
OnPanelOpened(UI)
This function is called when the menu is spawned
Declaration
protected virtual void OnPanelOpened(UI panelUI)
Parameters
Type | Name | Description |
---|---|---|
UI | panelUI | Instance of the menu |
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 |