RealmGateAddressComponentSystem.cs 614 B

123456789101112131415161718192021222324252627282930
  1. using ETModel;
  2. namespace ETHotfix
  3. {
  4. [ObjectSystem]
  5. public class RealmGateAddressComponentSystem : StartSystem<RealmGateAddressComponent>
  6. {
  7. public override void Start(RealmGateAddressComponent self)
  8. {
  9. self.Start();
  10. }
  11. }
  12. public static class RealmGateAddressComponentEx
  13. {
  14. public static void Start(this RealmGateAddressComponent component)
  15. {
  16. StartConfig[] startConfigs = StartConfigComponent.Instance.GetAll();
  17. foreach (StartConfig config in startConfigs)
  18. {
  19. if (!config.AppType.Is(AppType.Gate))
  20. {
  21. continue;
  22. }
  23. component.GateAddress.Add(config);
  24. }
  25. }
  26. }
  27. }