Loading...
Searching...
No Matches
AdventureCore.ItemBase Class Reference

Detailed Description

base class for items, items are anything character can own some amount of
implementations can define whether they can be used, equipped or both and then implement some logic that happens in those cases
for example a health potion could be used and equipped, when it is equipped it shows up on the characters belt
and when it is used it starts a healing action or just directly adds health

https://adventure.softleitner.com/manual/item

Inheritance diagram for AdventureCore.ItemBase:
AdventureCore.CapacityRaisingItem AdventureCore.GenericItem AdventureCore.PlaceholderItem AdventureCore.PrefabItem AdventureHero.HeroEquipmentItem AdventureSouls.SoulsArmorItem AdventureSouls.SoulsArrowItem AdventureSouls.SoulsUsableItem AdventureSouls.SoulsWeaponItem

Public Member Functions

virtual bool CanAdd (InventoryBase inventory, int quantity=1)
 
virtual bool OnAdd (InventoryBase inventory, int quantity, out InventoryItem inventoryItem)
 
virtual bool CanUse (CharacterBase character, int quantity=1)
 
virtual bool OnUse (CharacterBase character, int quantity=1)
 
virtual bool CanEquip (CharacterBase character)
 
virtual void OnEquip (CharacterBase character)
 
virtual void OnUnequip (CharacterBase character)
 
void Add (CharacterBase character)
 
void Remove (CharacterBase character)
 
void Add (CharacterActionBase action)
 
void Remove (CharacterActionBase action)
 
override string ToString ()
 

Public Attributes

string Key
 
string Name
 
string Description
 
Sprite Image
 
GameObject Visual
 
ItemCategory Category
 
ItemSlotCategory Slot
 

Properties

virtual bool IsStackable [get]
 
virtual bool IsEquippable [get]
 
virtual bool IsUsable [get]