using System; using System.Collections.Generic; using System.IO; namespace ET { public class AppConfigAwakeSystem : AwakeSystem { public override void Awake(AppConfig self) { self.Awake(); } } public class AppConfigLoadSystem : LoadSystem { public override void Load(AppConfig self) { self.Load(); } } public static class AppConfigSystem { public static void Awake(this AppConfig self) { self.Load(); } public static void Load(this AppConfig self) { self.AwakeAsync().Coroutine(); } private static async ETVoid AwakeAsync(this AppConfig self) { string path = "../Config/AppConfig.txt"; string str = await File.ReadAllTextAsync(path); AppConfigInfo appConfigInfo = MongoHelper.FromJson(str); AppConfig.inst = appConfigInfo; } } }