ILSUpdateSystem.cs 766 B

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