35 lines
868 B
C#
35 lines
868 B
C#
using UnityEngine;
|
|
|
|
public enum ObjectType
|
|
{
|
|
Item,
|
|
Consumable,
|
|
Armour,
|
|
Weapon,
|
|
Projectile,
|
|
Interactable
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "NewObjectData", menuName = "RPG/Object Data")]
|
|
public class ObjectData : ScriptableObject
|
|
{
|
|
[Header("Basic Information")]
|
|
public string objectName = "New Object";
|
|
[TextArea] public string description;
|
|
public ObjectType objectType = ObjectType.Item;
|
|
public Sprite icon; // Useful for UI Inventories
|
|
|
|
[Header("State Flags")]
|
|
public bool isQuestItem = false;
|
|
public bool isPickupAble = true;
|
|
public bool isInteractable = false;
|
|
public bool isDamagable = false;
|
|
|
|
[Header("Physical Attributes")]
|
|
public float weight = 1.0f;
|
|
public int valueInGold = 10;
|
|
|
|
[Tooltip("The starting health if this object is damageable.")]
|
|
public float maxHealth = 50f;
|
|
}
|