Class BodyGadgetItem
A type of item that holds a body gadget.
Implements
Constructors
BodyGadgetItem(int)
A type of item that holds a body gadget.
Declaration
public BodyGadgetItem(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | ID of the body gadget it holds |
Properties
GadgetID
ID of the body gadget it holds
Declaration
public int GadgetID { get; init; }
Methods
CanUse(Character)
True if this item can be use at current frame
Declaration
public override bool CanUse(Character holder)
Parameters
| Type | Name | Description |
|---|---|---|
| Character | holder | Holder that trying to use this item |
Overrides
DrawItem(Entity, IRect, Color32, int)
Call this function to render the item
Declaration
public override void DrawItem(Entity holder, IRect rect, Color32 tint, int z)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | holder | Holder that own this item |
| IRect | rect | Rect position in global space |
| Color32 | tint | Color tint |
| int | z | Z value for sort rendering cells |
Overrides
Use(Character, int, int, out bool)
Perform the logic when the item get used
Declaration
public override bool Use(Character holder, int inventoryID, int itemIndex, out bool consume)
Parameters
| Type | Name | Description |
|---|---|---|
| Character | holder | Holder that using this item |
| int | inventoryID | Inventory ID of this holder |
| int | itemIndex | Index of this item inside the inventory |
| bool | consume | True if the item should disappear after being used |
Returns
| Type | Description |
|---|---|
| bool | True if the item is used |