NetOuterComponent.cs 624 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Base;
  2. namespace Model
  3. {
  4. [ObjectEvent]
  5. public class NetOuterComponentEvent : ObjectEvent<NetOuterComponent>, IAwake, IAwake<string, int>, IUpdate
  6. {
  7. public void Awake()
  8. {
  9. this.Get().Awake();
  10. }
  11. public void Awake(string a, int b)
  12. {
  13. this.Get().Awake(a, b);
  14. }
  15. public void Update()
  16. {
  17. this.Get().Update();
  18. }
  19. }
  20. public class NetOuterComponent: NetworkComponent
  21. {
  22. public void Awake()
  23. {
  24. this.Awake(NetworkProtocol.UDP);
  25. }
  26. public void Awake(string host, int port)
  27. {
  28. this.Awake(NetworkProtocol.UDP, host, port);
  29. }
  30. public new void Update()
  31. {
  32. base.Update();
  33. }
  34. }
  35. }