ILSRollbackSystem.cs 807 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ET
  4. {
  5. public interface ILSRollback
  6. {
  7. }
  8. public interface ILSRollbackSystem: ISystemType
  9. {
  10. void Run(Entity o);
  11. }
  12. [LSEntitySystem]
  13. public abstract class LSRollbackSystem<T>: SystemObject, ILSRollbackSystem where T: Entity, ILSRollback
  14. {
  15. void ILSRollbackSystem.Run(Entity o)
  16. {
  17. this.LSRollback((T)o);
  18. }
  19. Type ISystemType.Type()
  20. {
  21. return typeof(T);
  22. }
  23. Type ISystemType.SystemType()
  24. {
  25. return typeof(ILSRollbackSystem);
  26. }
  27. int ISystemType.GetInstanceQueueIndex()
  28. {
  29. return InstanceQueueIndex.None;
  30. }
  31. protected abstract void LSRollback(T self);
  32. }
  33. }