⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    Interface IInventory

    The inventory interface.

    Inherited Members
    IMonoBehaviour.enabled
    IMonoBehaviour.name
    IMonoBehaviour.gameObject
    IMonoBehaviour.transform
    IMonoBehaviour.GetComponent<T>()
    IMonoBehaviour.GetComponentInChildren<T>()
    IMonoBehaviour.GetComponentInParent<T>()
    IMonoBehaviour.GetComponents<T>()
    IMonoBehaviour.GetComponentsInChildren<T>(Boolean)
    IMonoBehaviour.GetComponentsInParent<T>(Boolean)
    IMonoBehaviour.GetComponent(Type)
    IMonoBehaviour.GetComponentInChildren(Type)
    IMonoBehaviour.GetComponentInParent(Type)
    IMonoBehaviour.GetComponents(Type)
    IMonoBehaviour.GetComponentsInChildren(Type, Boolean)
    IMonoBehaviour.GetComponentsInParent(Type, Boolean)
    Namespace: NeoFPS
    Assembly: NeoFPS.dll
    Syntax
    public interface IInventory : IMonoBehaviour
    Remarks

    If you want to replace the NeoFPS inventory systems with your own, or another third party implementation, then implement this interface and other NeoFPS systems will still be able to interact with it.

    Properties

    duplicateBehaviour

    Declaration
    DuplicateEntryBehaviourFull duplicateBehaviour { get; }
    Property Value
    Type Description
    DuplicateEntryBehaviourFull

    Methods

    AddItem(IInventoryItem)

    Add an item to the inventory.

    Declaration
    InventoryAddResult AddItem(IInventoryItem item)
    Parameters
    Type Name Description
    IInventoryItem item

    The item to add.

    Returns
    Type Description
    InventoryAddResult

    The result of the addition (success, partial, failure).

    See Also
    InventoryAddResult

    AddItemFromPrefab(GameObject)

    Declaration
    InventoryAddResult AddItemFromPrefab(GameObject prefab)
    Parameters
    Type Name Description
    GameObject prefab
    Returns
    Type Description
    InventoryAddResult

    ApplyLoadout(FpsInventoryLoadout, Boolean)

    Declaration
    void ApplyLoadout(FpsInventoryLoadout loadout, bool replace = true)
    Parameters
    Type Name Description
    FpsInventoryLoadout loadout
    System.Boolean replace

    ApplyLoadout(IInventoryItem[], Boolean, Boolean)

    Declaration
    void ApplyLoadout(IInventoryItem[] loadout, bool prefabs, bool replace = true)
    Parameters
    Type Name Description
    IInventoryItem[] loadout
    System.Boolean prefabs
    System.Boolean replace

    ClearAllItems(UnityAction<IInventoryItem>)

    Declaration
    void ClearAllItems(UnityAction<IInventoryItem> onClearAction)
    Parameters
    Type Name Description
    UnityAction<IInventoryItem> onClearAction

    GetItem(Int32)

    Declaration
    IInventoryItem GetItem(int identifier)
    Parameters
    Type Name Description
    System.Int32 identifier
    Returns
    Type Description
    IInventoryItem

    GetItems()

    Declaration
    IInventoryItem[] GetItems()
    Returns
    Type Description
    IInventoryItem[]

    GetItems(InventoryCallbacks.FilterItem)

    Declaration
    IInventoryItem[] GetItems(InventoryCallbacks.FilterItem filter)
    Parameters
    Type Name Description
    InventoryCallbacks.FilterItem filter
    Returns
    Type Description
    IInventoryItem[]

    GetItems(List<IInventoryItem>)

    Declaration
    void GetItems(List<IInventoryItem> output)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IInventoryItem> output

    GetItems(List<IInventoryItem>, InventoryCallbacks.FilterItem)

    Declaration
    void GetItems(List<IInventoryItem> output, InventoryCallbacks.FilterItem filter)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IInventoryItem> output
    InventoryCallbacks.FilterItem filter

    GetItemsSorted(InventoryCallbacks.FilterItem, Comparison<IInventoryItem>)

    Declaration
    IInventoryItem[] GetItemsSorted(InventoryCallbacks.FilterItem filter, Comparison<IInventoryItem> compare)
    Parameters
    Type Name Description
    InventoryCallbacks.FilterItem filter
    System.Comparison<IInventoryItem> compare
    Returns
    Type Description
    IInventoryItem[]

    GetItemsSorted(List<IInventoryItem>, InventoryCallbacks.FilterItem, Comparison<IInventoryItem>)

    Declaration
    void GetItemsSorted(List<IInventoryItem> output, InventoryCallbacks.FilterItem filter, Comparison<IInventoryItem> compare)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IInventoryItem> output
    InventoryCallbacks.FilterItem filter
    System.Comparison<IInventoryItem> compare

    RemoveItem(IInventoryItem)

    Declaration
    void RemoveItem(IInventoryItem item)
    Parameters
    Type Name Description
    IInventoryItem item

    RemoveItem(Int32, UnityAction<IInventoryItem>)

    Declaration
    void RemoveItem(int itemIdentifier, UnityAction<IInventoryItem> onClearAction)
    Parameters
    Type Name Description
    System.Int32 itemIdentifier
    UnityAction<IInventoryItem> onClearAction

    Events

    onItemAdded

    Declaration
    event UnityAction<IInventoryItem> onItemAdded
    Event Type
    Type Description
    UnityAction<IInventoryItem>

    onItemRemoved

    Declaration
    event UnityAction<IInventoryItem> onItemRemoved
    Event Type
    Type Description
    UnityAction<IInventoryItem>
    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX