(client) feat:实现健康状态定义,实现事件定义
This commit is contained in:
17
Client/Assets/Scripts/Data/HediffCompDef.cs
Normal file
17
Client/Assets/Scripts/Data/HediffCompDef.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Data
|
||||
{
|
||||
public class HediffCompDef:Define
|
||||
{
|
||||
public Type compClass;
|
||||
public override bool Init(XElement xmlDef)
|
||||
{
|
||||
base.Init(xmlDef);
|
||||
var name = xmlDef.Attribute("class")?.Value??"";
|
||||
compClass=Type.GetType(name);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user