22 lines
567 B
C#
22 lines
567 B
C#
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>();
|
|
}
|
|
|
|
|
|
|