ClientComponentSystem.cs 1.2 KB

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