初次提交
This commit is contained in:
24
Script/Loader/Define/DrawNode.cs
Normal file
24
Script/Loader/Define/DrawNode.cs
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user