Files
godot-------/Script/Loader/Define/DrawNode.cs
m0_75251201 7700703099 初次提交
2025-07-12 11:30:22 +08:00

24 lines
649 B
C#

using System.Collections.Generic;
using System.Xml.Linq;
namespace Cosmobox.Def
{
public partial class DrawNode : Define
{
public string NodeName { get; set; }
public List<DrawNode> Children { get; set; } = [];
public override bool Init(XElement xmlDef)
{
base.Init(xmlDef);
NodeName = xmlDef.Element("NodeName")?.Value;
foreach (var childNode in xmlDef.Elements("DrawNode"))
{
DrawNode child = new DrawNode();
child.Init(childNode);
Children.Add(child);
}
return true;
}
}
}