NetOuterComponent.cs 657 B

1234567891011121314151617181920212223242526272829303132333435
  1. namespace ETModel
  2. {
  3. [ObjectSystem]
  4. public class NetOuterComponentAwakeSystem : AwakeSystem<NetOuterComponent>
  5. {
  6. public override void Awake(NetOuterComponent self)
  7. {
  8. self.Awake();
  9. }
  10. }
  11. [ObjectSystem]
  12. public class NetOuterComponentUpdateSystem : UpdateSystem<NetOuterComponent>
  13. {
  14. public override void Update(NetOuterComponent self)
  15. {
  16. self.Update();
  17. }
  18. }
  19. public class NetOuterComponent : NetworkComponent
  20. {
  21. public void Awake()
  22. {
  23. this.Awake(NetworkProtocol.KCP);
  24. this.MessagePacker = new ProtobufPacker();
  25. this.MessageDispatcher = new ClientDispatcher();
  26. }
  27. public new void Update()
  28. {
  29. base.Update();
  30. }
  31. }
  32. }