OptionComponentSystem.cs 516 B

123456789101112131415161718192021222324
  1. using System.IO;
  2. using Newtonsoft.Json;
  3. namespace KYFramework
  4. {
  5. [ObjectSystem]
  6. public class OptionComponentAwakeSystem : AwakeSystem<OptionComponent>
  7. {
  8. public override void Awake(OptionComponent self)
  9. {
  10. OptionComponent.Instance = self;
  11. string content = File.ReadAllText("Setting.json");
  12. self.option =JsonConvert.DeserializeObject<Option>(content);
  13. }
  14. }
  15. public static class OptionComponentSystem
  16. {
  17. }
  18. }