ILSRollbackSystem.cs 812 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. [EnableClass]
  13. [LSEntitySystem]
  14. public abstract class LSRollbackSystem<T> : ILSRollbackSystem where T: Entity, ILSRollback
  15. {
  16. void ILSRollbackSystem.Run(Entity o)
  17. {
  18. this.LSRollback((T)o);
  19. }
  20. Type ISystemType.Type()
  21. {
  22. return typeof(T);
  23. }
  24. Type ISystemType.SystemType()
  25. {
  26. return typeof(ILSRollbackSystem);
  27. }
  28. int ISystemType.GetInstanceQueueIndex()
  29. {
  30. return InstanceQueueIndex.None;
  31. }
  32. protected abstract void LSRollback(T self);
  33. }
  34. }