using System;
namespace ET
{
public interface IDeserialize
{
}
public interface IDeserializeSystem: ISystemType
{
void Run(Entity o);
}
///
/// 反序列化后执行的System
///
///
[ObjectSystem]
public abstract class DeserializeSystem : IDeserializeSystem where T: Entity, IDeserialize
{
void IDeserializeSystem.Run(Entity o)
{
this.Deserialize((T)o);
}
Type ISystemType.SystemType()
{
return typeof(IDeserializeSystem);
}
InstanceQueueIndex ISystemType.GetInstanceQueueIndex()
{
return InstanceQueueIndex.None;
}
Type ISystemType.Type()
{
return typeof(T);
}
protected abstract void Deserialize(T self);
}
}