ConfigComponent.cs 618 B

1234567891011121314151617181920212223242526
  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 struct GetAllConfigBytes
  12. {
  13. }
  14. public struct GetOneConfigBytes
  15. {
  16. public string ConfigName;
  17. }
  18. public static ConfigComponent Instance;
  19. public Dictionary<Type, object> AllConfig = new Dictionary<Type, object>();
  20. }
  21. }