MayHeCome/Assets/Editor/科技树/TechTreeData.cs

22 lines
567 B
C#
Raw Normal View History

2024-12-18 09:55:34 +00:00
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "NewTechTreeData", menuName = "科技树/科技树窗口")]
[System.Serializable]
public class TechTreeData : ScriptableObject
{
public TechNodeData headNode; // 只保存头节点的信息
}
[System.Serializable]
public class TechNodeData
{
public List<TechNodeData> children=new List<TechNodeData>();
public Vector2 position;
public string title;
public string techItemPath; // 保存 TechItem 的路径
public List<string> parents = new List<string>();
}