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