NetOuterComponent.cs 682 B

123456789101112131415161718192021222324252627282930313233343536
  1. namespace Model
  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.TCP);
  24. this.MessagePacker = new ProtobufPacker();
  25. // 由hotfix中设置
  26. //this.MessageDispatcher = new ClientDispatcher();
  27. }
  28. public new void Update()
  29. {
  30. base.Update();
  31. }
  32. }
  33. }