ConfigComponent.cs 494 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ET
  4. {
  5. /// <summary>
  6. /// Config组件会扫描所有的有ConfigAttribute标签的配置,加载进来
  7. /// </summary>
  8. [ComponentOf(typeof(Scene))]
  9. public class ConfigComponent: Entity, IAwake, IDestroy
  10. {
  11. public IConfigLoader ConfigLoader { get; set; }
  12. public static ConfigComponent Instance;
  13. public Dictionary<Type, object> AllConfig = new Dictionary<Type, object>();
  14. }
  15. }