RealmGateAddressComponentE.cs 599 B

123456789101112131415161718192021222324252627282930
  1. using Model;
  2. namespace Hotfix
  3. {
  4. [ObjectEvent]
  5. public class RealmGateAddressComponentEvent : ObjectEvent<RealmGateAddressComponent>, IAwake
  6. {
  7. public void Awake()
  8. {
  9. this.Get().Awake();
  10. }
  11. }
  12. public static class RealmGateAddressComponentE
  13. {
  14. public static void Awake(this RealmGateAddressComponent component)
  15. {
  16. StartConfig[] startConfigs = component.GetComponent<StartConfigComponent>().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. }