GameEntry.Builtin.cs 6.1 KB

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