Compare commits

...

3 Commits

3 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,48 @@
using System.Collections.Generic;
using System.Xml.Linq;
namespace Data
{
public class Character : Define
{
public DrawingOrder
drawingOrder_down,
drawingOrder_up,
drawingOrder_left,
drawingOrder_right;
}
public class DrawingOrder : Define
{
public List<DrawNode> DrawNodes { get; set; } = new List<DrawNode>();
public override bool Init(XElement xmlDef)
{
base.Init(xmlDef);
foreach (var node in xmlDef.Elements("DrawNodes"))
{
DrawNode drawNode = new DrawNode();
drawNode.Init(node);
DrawNodes.Add(drawNode);
}
return true;
}
}
public partial class DrawNode : Define
{
public string NodeName { get; set; }
public List<DrawNode> Children { get; set; } = new();
public override bool Init(XElement xmlDef)
{
base.Init(xmlDef);
NodeName = xmlDef.Attribute("name")?.Value;
foreach (var childNode in xmlDef.Elements("DrawNode"))
{
DrawNode child = new DrawNode();
child.Init(childNode);
Children.Add(child);
}
return true;
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e277dc789917427a81ab775cb5e74107
timeCreated: 1752403551

View File

@ -102,7 +102,7 @@ namespace Data
/// <summary>
/// define类别及其定义
/// </summary>
public Dictionary<string, List<Define>> defines;
public Dictionary<string, List<Define>> defines=new();
public PackAbout packAbout;
public string packID;