IEnvironment.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.Collections.Generic;
  3. using IFramework;
  4. namespace IFramework
  5. {
  6. /// <summary>
  7. /// 环境
  8. /// </summary>
  9. public interface IEnvironment: IDisposable
  10. {
  11. /// <summary>
  12. /// 环境类型
  13. /// </summary>
  14. EnvironmentType envType { get; }
  15. /// <summary>
  16. /// 是否初始化完成
  17. /// </summary>
  18. bool inited { get; }
  19. /// <summary>
  20. /// 模块容器
  21. /// </summary>
  22. IModules modules { get; }
  23. /// <summary>
  24. /// 时间
  25. /// </summary>
  26. ITimeCalculator time { get; }
  27. /// <summary>
  28. /// 绑定 Dispose
  29. /// </summary>
  30. /// <param name="action"></param>
  31. void BindDispose(Action action);
  32. /// <summary>
  33. /// 绑定 Update
  34. /// </summary>
  35. /// <param name="action"></param>
  36. void BindUpdate(Action action);
  37. /// <summary>
  38. /// 初始化
  39. /// </summary>
  40. /// <param name="types"></param>
  41. void Init(IEnumerable<Type> types);
  42. /// <summary>
  43. /// 初始化
  44. /// </summary>
  45. void InitWithAttribute();
  46. /// <summary>
  47. /// 解绑 Dispose
  48. /// </summary>
  49. /// <param name="action"></param>
  50. void UnBindDispose(Action action);
  51. /// <summary>
  52. /// 解绑 Update
  53. /// </summary>
  54. /// <param name="action"></param>
  55. void UnBindUpdate(Action action);
  56. /// <summary>
  57. /// 刷新
  58. /// </summary>
  59. void Update();
  60. /// <summary>
  61. /// 等待环境刷新
  62. /// </summary>
  63. /// <param name="action"></param>
  64. void WaitEnvironmentFrame(Action action);
  65. }
  66. }