NetOuterComponentSystem.cs 1.1 KB

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