RouterConfigSingleton.cs 702 B

1234567891011121314151617181920212223242526
  1. using System.Collections.Generic;
  2. namespace ET.Server
  3. {
  4. [ConfigProcess]
  5. public class RouterConfigSingleton: Singleton<RouterConfigSingleton>, ISingletonAwake
  6. {
  7. private readonly List<StartSceneConfig> routers = new();
  8. public void Awake()
  9. {
  10. foreach (StartSceneConfig startSceneConfig in StartSceneConfigCategory.Instance.GetAll().Values)
  11. {
  12. if (startSceneConfig.Type == SceneType.Router)
  13. {
  14. this.routers.Add(startSceneConfig);
  15. }
  16. }
  17. }
  18. public List<StartSceneConfig> GetRouters()
  19. {
  20. return this.routers;
  21. }
  22. }
  23. }