MainEntry.Builtin.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityGameFramework.Runtime;
  5. namespace GFMain
  6. {
  7. public partial class MainEntry : MonoBehaviour
  8. {
  9. /// <summary>
  10. /// 获取游戏基础组件。
  11. /// </summary>
  12. public static BaseComponent Base
  13. {
  14. get;
  15. private set;
  16. }
  17. /// <summary>
  18. /// 获取配置组件。
  19. /// </summary>
  20. public static LocalConfigComponent Config
  21. {
  22. get;
  23. private set;
  24. }
  25. /// <summary>
  26. /// 获取数据结点组件。
  27. /// </summary>
  28. public static DataNodeComponent DataNode
  29. {
  30. get;
  31. private set;
  32. }
  33. /// <summary>
  34. /// 获取数据表组件。
  35. /// </summary>
  36. public static DataTableComponent DataTable
  37. {
  38. get;
  39. private set;
  40. }
  41. /// <summary>
  42. /// 获取调试组件。
  43. /// </summary>
  44. public static DebuggerComponent Debugger
  45. {
  46. get;
  47. private set;
  48. }
  49. /// <summary>
  50. /// 获取下载组件。
  51. /// </summary>
  52. public static DownloadComponent Download
  53. {
  54. get;
  55. private set;
  56. }
  57. /// <summary>
  58. /// 获取实体组件。
  59. /// </summary>
  60. public static EntityComponent Entity
  61. {
  62. get;
  63. private set;
  64. }
  65. /// <summary>
  66. /// 获取事件组件。
  67. /// </summary>
  68. public static EventComponent Event
  69. {
  70. get;
  71. private set;
  72. }
  73. /// <summary>
  74. /// 获取文件系统组件。
  75. /// </summary>
  76. public static FileSystemComponent FileSystem
  77. {
  78. get;
  79. private set;
  80. }
  81. /// <summary>
  82. /// 获取有限状态机组件。
  83. /// </summary>
  84. public static FsmComponent Fsm
  85. {
  86. get;
  87. private set;
  88. }
  89. /// <summary>
  90. /// 获取本地化组件。
  91. /// </summary>
  92. public static LocalizationComponent Localization
  93. {
  94. get;
  95. private set;
  96. }
  97. /// <summary>
  98. /// 获取网络组件。
  99. /// </summary>
  100. public static NetworkComponent Network
  101. {
  102. get;
  103. private set;
  104. }
  105. /// <summary>
  106. /// 获取对象池组件。
  107. /// </summary>
  108. public static ObjectPoolComponent ObjectPool
  109. {
  110. get;
  111. private set;
  112. }
  113. /// <summary>
  114. /// 获取流程组件。
  115. /// </summary>
  116. public static ProcedureComponent Procedure
  117. {
  118. get;
  119. private set;
  120. }
  121. /// <summary>
  122. /// 获取资源组件。
  123. /// </summary>
  124. public static ResourceComponent Resource
  125. {
  126. get;
  127. private set;
  128. }
  129. /// <summary>
  130. /// 获取场景组件。
  131. /// </summary>
  132. public static SceneComponent Scene
  133. {
  134. get;
  135. private set;
  136. }
  137. /// <summary>
  138. /// 获取配置组件。
  139. /// </summary>
  140. public static SettingComponent Setting
  141. {
  142. get;
  143. private set;
  144. }
  145. /// <summary>
  146. /// 获取声音组件。
  147. /// </summary>
  148. public static SoundComponent Sound
  149. {
  150. get;
  151. private set;
  152. }
  153. /// <summary>
  154. /// 获取界面组件。
  155. /// </summary>
  156. public static UIComponent UI
  157. {
  158. get;
  159. private set;
  160. }
  161. /// <summary>
  162. /// 获取网络组件。
  163. /// </summary>
  164. public static WebRequestComponent WebRequest
  165. {
  166. get;
  167. private set;
  168. }
  169. private static void InitBuiltinComponents()
  170. {
  171. Base = GameEntry.GetComponent<BaseComponent>();
  172. Config = GameEntry.GetComponent<LocalConfigComponent>();
  173. DataNode = GameEntry.GetComponent<DataNodeComponent>();
  174. DataTable = GameEntry.GetComponent<DataTableComponent>();
  175. Debugger = GameEntry.GetComponent<DebuggerComponent>();
  176. Download = GameEntry.GetComponent<DownloadComponent>();
  177. Entity = GameEntry.GetComponent<EntityComponent>();
  178. Event = GameEntry.GetComponent<EventComponent>();
  179. FileSystem = GameEntry.GetComponent<FileSystemComponent>();
  180. Fsm = GameEntry.GetComponent<FsmComponent>();
  181. Localization = GameEntry.GetComponent<LocalizationComponent>();
  182. Network = GameEntry.GetComponent<NetworkComponent>();
  183. ObjectPool = GameEntry.GetComponent<ObjectPoolComponent>();
  184. Procedure = GameEntry.GetComponent<ProcedureComponent>();
  185. Resource = GameEntry.GetComponent<ResourceComponent>();
  186. Scene = GameEntry.GetComponent<SceneComponent>();
  187. Setting = GameEntry.GetComponent<SettingComponent>();
  188. Sound = GameEntry.GetComponent<SoundComponent>();
  189. UI = GameEntry.GetComponent<UIComponent>();
  190. WebRequest = GameEntry.GetComponent<WebRequestComponent>();
  191. }
  192. }
  193. }