(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
@ -20,11 +20,12 @@ namespace Data
|
||||
value = xmlDef.Attribute("value")?.Value;
|
||||
|
||||
var nodes = xmlDef.Elements("Node");
|
||||
if (!nodes.Any())
|
||||
var xElements = nodes as XElement[] ?? nodes.ToArray();
|
||||
if (!xElements.Any())
|
||||
return true; // 没有子节点也是有效的
|
||||
|
||||
List<BehaviorTreeDef> children = new();
|
||||
foreach (var node in nodes)
|
||||
foreach (var node in xElements)
|
||||
{
|
||||
var childNode = new BehaviorTreeDef();
|
||||
if (!childNode.Init(node))
|
||||
|
Reference in New Issue
Block a user