(client) chore:Clean code
This commit is contained in:
@ -7,10 +7,10 @@ namespace Data
|
||||
public class BehaviorTreeDef : Define
|
||||
{
|
||||
public BehaviorTreeDef[] childTree;
|
||||
public string className= "ThinkNode_Selector";
|
||||
public string className = "ThinkNode_Selector";
|
||||
public string value;
|
||||
|
||||
|
||||
|
||||
|
||||
public override bool Init(XElement xmlDef)
|
||||
{
|
||||
base.Init(xmlDef);
|
||||
@ -23,7 +23,7 @@ namespace Data
|
||||
var xElements = nodes as XElement[] ?? nodes.ToArray();
|
||||
if (!xElements.Any())
|
||||
return true; // 没有子节点也是有效的
|
||||
|
||||
|
||||
List<BehaviorTreeDef> children = new();
|
||||
foreach (var node in xElements)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace Data
|
||||
{
|
||||
public class BulletDef:EntityDef
|
||||
public class BulletDef : EntityDef
|
||||
{
|
||||
public string className;
|
||||
public string value;
|
||||
|
@ -1,10 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
public class CharacterDef : EntityDef
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Configs;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -5,9 +6,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Configs;
|
||||
using UnityEngine;
|
||||
using Object = System.Object;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ namespace Data
|
||||
public DrawNodeDef rangedAttack_up;
|
||||
public DrawNodeDef rangedAttack_left;
|
||||
public DrawNodeDef rangedAttack_right;
|
||||
|
||||
|
||||
public DrawNodeDef GetDrawNodeDef(EntityState state, Orientation orientation,
|
||||
out Orientation? fallbackOrientation)
|
||||
{
|
||||
@ -237,7 +237,7 @@ namespace Data
|
||||
{
|
||||
base.Init(xmlDef);
|
||||
|
||||
nodeName = xmlDef.Attribute("name")?.Value??"noName";
|
||||
nodeName = xmlDef.Attribute("name")?.Value ?? "noName";
|
||||
position = StringToVector(xmlDef.Attribute("position")?.Value ?? "(0 0)");
|
||||
FPS = float.TryParse(xmlDef.Attribute("FPS")?.Value, out var result) ? result : 1.0f;
|
||||
return false;
|
||||
|
@ -1,8 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
public class EntityDef : Define
|
||||
|
@ -46,5 +46,5 @@ namespace Data
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace Data
|
||||
{
|
||||
public class MonsterDef:EntityDef
|
||||
public class MonsterDef : EntityDef
|
||||
{
|
||||
public WeaponDef weapon;
|
||||
}
|
||||
|
Reference in New Issue
Block a user