NetOuterComponentSystem.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System.Collections.Generic;
  2. using System.Net;
  3. using ETModel;
  4. namespace ETHotfix
  5. {
  6. [ObjectSystem]
  7. public class NetOuterComponentAwakeSystem : AwakeSystem<NetOuterComponent>
  8. {
  9. public override void Awake(NetOuterComponent self)
  10. {
  11. self.Awake(self.Protocol);
  12. self.MessagePacker = new ProtobufPacker();
  13. self.MessageDispatcher = new OuterMessageDispatcher();
  14. }
  15. }
  16. [ObjectSystem]
  17. public class NetOuterComponentAwake1System : AwakeSystem<NetOuterComponent, string>
  18. {
  19. public override void Awake(NetOuterComponent self, string address)
  20. {
  21. self.Awake(self.Protocol, address);
  22. self.MessagePacker = new ProtobufPacker();
  23. self.MessageDispatcher = new OuterMessageDispatcher();
  24. }
  25. }
  26. [ObjectSystem]
  27. public class NetOuterComponentLoadSystem : LoadSystem<NetOuterComponent>
  28. {
  29. public override void Load(NetOuterComponent self)
  30. {
  31. self.MessagePacker = new ProtobufPacker();
  32. self.MessageDispatcher = new OuterMessageDispatcher();
  33. }
  34. }
  35. [ObjectSystem]
  36. public class NetOuterComponentUpdateSystem : UpdateSystem<NetOuterComponent>
  37. {
  38. public override void Update(NetOuterComponent self)
  39. {
  40. self.Update();
  41. }
  42. }
  43. }