NetOuterComponentSystem.cs 896 B

12345678910111213141516171819202122232425262728293031323334353637
  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 NetOuterComponentUpdateSystem : UpdateSystem<NetOuterComponent>
  28. {
  29. public override void Update(NetOuterComponent self)
  30. {
  31. self.Update();
  32. }
  33. }
  34. }