com.spellboundar.items
v4.4.0
Published
A framework for working with items, item-types, and item-instances.
Downloads
14
Readme
Items
Version: 4.4.0
Description:
A framework for working with items, item-types, and item-instances.
Dependencies:
- com.unity.localization (1.3.2)
- com.iron-mountain.resource-utilities (1.1.3)
- com.iron-mountain.save-system (1.0.4)
Key Scripts & Components:
- public class BasicItemTypeData
- Properties:
- public String ID { get; set; }
- public String Name { get; }
- public Sprite Depiction { get; }
- public String LocalizedName { get; }
- public String Description { get; set; }
- public Boolean ShowInInventory { get; set; }
- public List Instances { get; }
- Methods:
- public virtual Object InstantiateAnInstance(Transform parent)
- public virtual void OnValidate()
- Properties:
- public class Database : ScriptableObject
- Properties:
- public List Types { get; }
- Methods:
- public ScriptedItemTypeData GetItemTypeByName(String itemTypeName)
- public ScriptedItemTypeData GetItemTypeByID(String itemTypeID)
- public ScriptedItemTypeData GetRandomItemType()
- public void SortList()
- public void RebuildDictionary()
- public override String ToString()
- Properties:
- public interface IItem
- public interface IItemInstanceData
- Actions:
- public event Action OnVisibleChanged
- public event Action OnInteractableChanged
- public event Action OnInteractionCountChanged
- Properties:
- public String ID { get; set; }
- public String Name { get; }
- public IItemTypeData Type { get; set; }
- public Boolean Visible { get; set; }
- public Boolean Interactable { get; set; }
- public Int32 InteractionCount { get; set; }
- Methods:
- public abstract void OnValidate()
- public abstract void RefreshName()
- Actions:
- public interface IItemTypeData
- Properties:
- public String ID { get; set; }
- public String Name { get; }
- public Sprite Depiction { get; }
- public String LocalizedName { get; }
- public String Description { get; }
- public Boolean ShowInInventory { get; }
- public List Instances { get; }
- Methods:
- public abstract Object InstantiateAnInstance(Transform parent)
- public abstract void OnValidate()
- Properties:
- public class Item : MonoBehaviour
- Actions:
- public event Action OnVisibleChanged
- public event Action OnInteractableChanged
- public event Action OnInteractionCountChanged
- Properties:
- public IItemTypeData Type { get; set; }
- public Int32 InteractionCount { get; set; }
- public String ID { get; set; }
- public String Name { get; }
- public Sprite Depiction { get; }
- public String LocalizedName { get; }
- public String Description { get; }
- public Boolean ShowInInventory { get; }
- public List Instances { get; }
- public Boolean Visible { get; set; }
- public Boolean Interactable { get; set; }
- Methods:
- public virtual Object InstantiateAnInstance(Transform parent)
- public virtual void RefreshName()
- public virtual void OnValidate()
- Actions:
- public static class ItemsManager
- public class ScriptedItemInstanceData : ScriptableObject
- Actions:
- public event Action OnVisibleChanged
- public event Action OnInteractableChanged
- public event Action OnInteractionCountChanged
- Properties:
- public String ID { get; set; }
- public ScriptedItemTypeData ScriptedItemTypeData { get; set; }
- public String Name { get; }
- public IItemTypeData Type { get; set; }
- public Boolean InitiallyVisible { get; }
- public Boolean InitiallyInteractable { get; }
- public Boolean Visible { get; set; }
- public Boolean Interactable { get; set; }
- public Int32 InteractionCount { get; set; }
- Methods:
- public void Reset()
- public virtual void OnValidate()
- public virtual void RefreshName()
- Actions:
- public class ScriptedItemTypeData : ScriptableObject
- Properties:
- public String ID { get; set; }
- public String Name { get; }
- public String LocalizedName { get; }
- public Sprite Depiction { get; }
- public String Description { get; }
- public Boolean ShowInInventory { get; }
- public List ScriptedInstances { get; }
- public List Instances { get; }
- Methods:
- public virtual Object InstantiateAnInstance(Transform parent)
- public void Reset()
- public virtual void OnValidate()
- public void GenerateNewID()
- public virtual Boolean HasErrors()
- Properties:
- public class ScriptedItemTypeDataList : ScriptableObject
- Properties:
- public List ItemTypes { get; }
- Properties:
Inventories
- public class BasicInventoryEntry
- Actions:
- public event Action OnQuantityChanged
- public event Action OnViewsChanged
- Properties:
- public IItemTypeData ItemTypeData { get; }
- public String ItemTypeID { get; }
- public Int32 Quantity { get; set; }
- public Int32 Views { get; set; }
- public DateTime Timestamp { get; }
- Actions:
- public interface IInventory
- Actions:
- public event Action OnEntriesChanged
- Properties:
- public String ID { get; }
- Methods:
- public abstract List`1 GetAllEntries()
- public abstract IInventoryEntry GetEntry(IItemTypeData itemTypeData)
- public abstract void Add(IItemTypeData itemTypeData, Int32 quantity)
- public abstract void Remove(IItemTypeData itemTypeData, Int32 quantity)
- public abstract void RemoveAll(IItemTypeData itemTypeData)
- public abstract void Clear()
- public virtual Int32 GetItemQuantity(IItemTypeData itemTypeData)
- public virtual List`1 GetEntries()
- Actions:
- public interface IInventoryEntry
- Actions:
- public event Action OnQuantityChanged
- public event Action OnViewsChanged
- Properties:
- public String ItemTypeID { get; }
- public IItemTypeData ItemTypeData { get; }
- public DateTime Timestamp { get; }
- public Int32 Quantity { get; set; }
- public Int32 Views { get; set; }
- Actions:
- public class SavedInventory
- Actions:
- public event Action OnEntriesChanged
- Properties:
- public String ID { get; }
- public String Directory { get; set; }
- Methods:
- public virtual List`1 GetAllEntries()
- public virtual IInventoryEntry GetEntry(IItemTypeData itemTypeData)
- public virtual void Add(IItemTypeData itemTypeData, Int32 quantity)
- public virtual void Remove(IItemTypeData itemTypeData, Int32 amount)
- public virtual void RemoveAll(IItemTypeData itemTypeData)
- public virtual void Clear()
- Actions:
- public class SavedInventoryEntry
- Actions:
- public event Action OnQuantityChanged
- public event Action OnViewsChanged
- Properties:
- public String Directory { get; }
- public String ItemTypeID { get; }
- public IItemTypeData ItemTypeData { get; }
- public Int32 Quantity { get; set; }
- public Int32 Views { get; set; }
- public DateTime Timestamp { get; }
- Actions:
- public class SavedInventoryMonoBehaviour : MonoBehaviour
- Actions:
- public event Action OnEntriesChanged
- Properties:
- public SavedInventory SavedInventory { get; }
- public String ID { get; }
- Methods:
- public void InvokeOnEntriesChanged()
- public virtual List`1 GetAllEntries()
- public virtual IInventoryEntry GetEntry(IItemTypeData itemTypeData)
- public virtual void Add(IItemTypeData itemTypeData, Int32 quantity)
- public virtual void Remove(IItemTypeData itemTypeData, Int32 quantity)
- public virtual void RemoveAll(IItemTypeData itemTypeData)
- public virtual void Clear()
- Actions:
- public class SavedInventoryScriptableObject : ScriptableObject
- Actions:
- public event Action OnEntriesChanged
- Properties:
- public SavedInventory SavedInventory { get; }
- public String ID { get; }
- Methods:
- public void InvokeOnEntriesChanged()
- public virtual List`1 GetAllEntries()
- public virtual IInventoryEntry GetEntry(IItemTypeData itemTypeData)
- public virtual void Add(IItemTypeData itemTypeData, Int32 quantity)
- public virtual void Remove(IItemTypeData itemTypeData, Int32 quantity)
- public virtual void RemoveAll(IItemTypeData itemTypeData)
- public virtual void Clear()
- Actions:
Inventories. U I
- public class InventoryDisplay : MonoBehaviour
- Properties:
- public IInventory Inventory { get; set; }
- Methods:
- public void Refresh()
- Properties:
- public class InventoryEntryDisplay : MonoBehaviour
- Actions:
- public event Action OnEntryChanged
- Properties:
- public IInventoryEntry Entry { get; set; }
- Actions:
- public class InventoryEntryDisplayImage : MonoBehaviour
- public class InventoryEntryDisplayNameText : MonoBehaviour
- public class InventoryEntryDisplayQuantityText : MonoBehaviour
Selections. Static
- public class StaticSelectedItemTypeImage : MonoBehaviour
- public static class StaticSelectedItemTypeManager
Selections. U I
- public class ItemTypeSelectionButton : MonoBehaviour
- Actions:
- public event Action OnMenuChanged
- public event Action OnItemTypeChanged
- public event Action OnIsSelectedChanged
- Properties:
- public ScriptedItemTypeData ScriptedItemTypeData { get; }
- public Boolean IsSelected { get; }
- Methods:
- public void Initialize(ItemTypeSelectionMenu menu, ScriptedItemTypeData scriptedItemTypeData)
- Actions:
- public class ItemTypeSelectionButtonImage : MonoBehaviour
- public class ItemTypeSelectionButtonOutline : MonoBehaviour
- Methods:
- public void Awake()
- Methods:
- public class ItemTypeSelectionMenu : MonoBehaviour
- Actions:
- public event Action OnSelectionChanged
- public event Action OnSelectionChangedTo
- Properties:
- public IItemTypeData PreviousSelection { get; }
- public IItemTypeData CurrentSelection { get; set; }
- public ScriptedItemTypeDataList Items { get; set; }
- Actions:
- public class NextItemTypeButton : MonoBehaviour
- Properties:
- public ItemTypeSelectionMenu ItemTypeSelectionMenu { get; set; }
- Properties:
- public class PreviousItemTypeButton : MonoBehaviour
- Properties:
- public ItemTypeSelectionMenu ItemTypeSelectionMenu { get; set; }
- Properties:
V F X
- public class ItemVFXVisibilityScaling : MonoBehaviour