AngeliA
Search Results for

    Show / Hide Table of Contents

    Class SwitchItem<TargetItem>

    A type of item that switch to another item when use

    Implements
    IMapItem
    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
    Item.MaxStackCount

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

    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)
    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 ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค