first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using OTGIntegrated.Stats;
|
||||
using UnityEngine;
|
||||
|
||||
namespace OTGIntegrated.Talents
|
||||
{
|
||||
[CreateAssetMenu(fileName = "TalentData", menuName = "OTG Integrated/Talent Data")]
|
||||
public sealed class TalentData : ScriptableObject
|
||||
{
|
||||
public string talentId;
|
||||
public string displayName;
|
||||
[TextArea(2, 5)] public string description;
|
||||
public Sprite icon;
|
||||
[Min(0)] public int cost = 1;
|
||||
public TalentData[] prerequisites;
|
||||
public StatModifier[] modifiers;
|
||||
public Vector2 treePosition;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(talentId))
|
||||
{
|
||||
talentId = name;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(displayName))
|
||||
{
|
||||
displayName = talentId;
|
||||
}
|
||||
|
||||
cost = Mathf.Max(0, cost);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user