Compare commits
3 Commits
ce2bda27d4
...
54a5481f09
Author | SHA1 | Date | |
---|---|---|---|
54a5481f09 | |||
bff61daf6c | |||
4abf6c90f0 |
48
Client/Assets/Scripts/Data/CharacterDefine.cs
Normal file
48
Client/Assets/Scripts/Data/CharacterDefine.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
3
Client/Assets/Scripts/Data/CharacterDefine.cs.meta
Normal file
3
Client/Assets/Scripts/Data/CharacterDefine.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e277dc789917427a81ab775cb5e74107
|
||||
timeCreated: 1752403551
|
@ -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;
|
||||
|
Reference in New Issue
Block a user