AngeliA
Search Results for

    Show / Hide Table of Contents

    Class BodyGadgetItem

    A type of item that holds a body gadget.

    Implements
    IMapItem

    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
    Item.CanUse(Character)

    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
    Item.DrawItem(Entity, IRect, Color32, int)

    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

    Overrides
    Item.Use(Character, int, int, out bool)
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค