• Api Documentation

    Show / Hide Table of Contents
    • CreatorKitCode
      • BaseElementalEffect
      • CharacterData
      • Container
      • ElementalEffect
      • EquipmentItem
      • EquipmentItem.EquipmentSlot
      • EquipmentItem.EquippedEffect
      • EquipmentSystem
      • Helpers
      • HighlightableObject
      • InteractableObject
      • InventorySystem
      • InventorySystem.InventoryEntry
      • Item
      • Loot
      • LootSpawner
      • LootSpawner.LootEntry
      • LootSpawner.SpawnEvent
      • SFXManager
      • SFXManager.PlayData
      • SFXManager.Use
      • SpawnPoint
      • StatSystem
      • StatSystem.DamageType
      • StatSystem.StatModifier
      • StatSystem.StatModifier.Mode
      • StatSystem.Stats
      • StatSystem.TimedStatModifier
      • UsableItem
      • UsableItem.UsageEffect
      • VFXDatabase
      • VFXDatabase.VFXDBEntry
      • VFXManager
      • VFXManager.VFXInstance
      • Weapon
      • Weapon.AttackData
      • Weapon.Stat
      • Weapon.WeaponAttackEffect
    • CreatorKitCodeInternal
      • AmbiencePlayer
      • AnimationControllerDispatcher
      • AnimationControllerDispatcher.IAttackFrameReceiver
      • AnimationControllerDispatcher.IFootstepFrameReceiver
      • AttackState
      • BreakableObject
      • CameraController
      • CharacterAudio
      • CharacterControl
      • DamageUI
      • DamageUI.ActiveText
      • EffectIconUI
      • EquipmentUI
      • InventoryCharacterRender
      • InventoryUI
      • InventoryUI.DragData
      • ItemEntryUI
      • ItemTooltip
      • LootUI
      • RandomBGMPlayer
      • RandomLoopOffset
      • ResourceManager
      • SceneLinkedSMB<TMonoBehaviour>
      • SimpleEnemyController
      • SimpleEnemyController.State
      • TrainingDummy
      • UIAlphaRaycast
      • UISystem

    Class InventorySystem

    This handles the inventory of our character. The inventory has a maximum of 32 slot, each slot can hold one TYPE of object, but those can be stacked without limit (e.g. 1 slot used by health potions, but contains 20 health potions)

    Inheritance
    System.Object
    InventorySystem
    Namespace: CreatorKitCode
    Assembly: Assembly-CSharp.dll
    Syntax
    public class InventorySystem

    Fields

    Entries

    Declaration
    public InventorySystem.InventoryEntry[] Entries
    Field Value
    Type Description
    InventorySystem.InventoryEntry[]

    Methods

    AddItem(Item)

    Add an item to the inventory. This will look if this item already exist in one of the slot and increment the stack counter there instead of using another slot.

    Declaration
    public void AddItem(Item item)
    Parameters
    Type Name Description
    Item item

    The item to add to the inventory

    Init(CharacterData)

    Declaration
    public void Init(CharacterData owner)
    Parameters
    Type Name Description
    CharacterData owner

    UseItem(InventorySystem.InventoryEntry)

    This will try to use the item. If the item return true when used, this will decrement the stack count and if the stack count reach 0 this will free the slot. If it return false, it will just ignore that call. (e.g. a potion will return false if the user is at full health, not consuming the potion in that case)

    Declaration
    public bool UseItem(InventorySystem.InventoryEntry item)
    Parameters
    Type Name Description
    InventorySystem.InventoryEntry item
    Returns
    Type Description
    System.Boolean
    Back to top Generated by DocFX