Class Item
Base clase of all items in the game. This is an abstract class and need to be inherited to specify behaviour. The project offer 3 type of items : UsableItem, Equipment and Weapon
Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
Item
Namespace: CreatorKitCode
Assembly: Assembly-CSharp.dll
Syntax
public abstract class Item : ScriptableObject
Fields
Description
Declaration
public string Description
Field Value
Type | Description |
---|---|
System.String |
ItemName
Declaration
public string ItemName
Field Value
Type | Description |
---|---|
System.String |
ItemSprite
Declaration
public Sprite ItemSprite
Field Value
Type | Description |
---|---|
UnityEngine.Sprite |
WorldObjectPrefab
Declaration
public GameObject WorldObjectPrefab
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |
Methods
GetDescription()
Declaration
public virtual string GetDescription()
Returns
Type | Description |
---|---|
System.String |
UsedBy(CharacterData)
Called by the inventory system when the object is "used" (double clicked)
Declaration
public virtual bool UsedBy(CharacterData user)
Parameters
Type | Name | Description |
---|---|---|
CharacterData | user | The CharacterDate that used that item |
Returns
Type | Description |
---|---|
System.Boolean | If it was actually used (allow the inventory to know if it can remove the object or not) |