12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- namespace ET
- {
- public interface IDeserialize
- {
- }
-
- public interface IDeserializeSystem: ISystemType
- {
- void Run(Entity o);
- }
-
-
-
-
- [ObjectSystem]
- public abstract class DeserializeSystem<T> : 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);
- }
- }
|