MCPcopy Create free account
hub / github.com/esengine/esengine / Core

Class Core

packages/core/src/Core.ts:59–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 * ```
58 */
59export class Core {
60 /**
61 * @zh 游戏暂停状态,当设置为true时,游戏循环将暂停执行
62 * @en Game paused state, when set to true, game loop will pause execution
63 */
64 public static paused = false;
65
66 /**
67 * @zh 全局核心实例,可能为null表示Core尚未初始化或已被销毁
68 * @en Global core instance, null means Core is not initialized or destroyed
69 */
70 private static _instance: Core | null = null;
71
72 /**
73 * @zh Core专用日志器
74 * @en Core logger
75 */
76 private static readonly _logger = createLogger('Core');
77
78 /**
79 * @zh 调试模式标志,在调试模式下会启用额外的性能监控和错误检查
80 * @en Debug mode flag, enables additional performance monitoring and error checking in debug mode
81 */
82 public readonly debug: boolean;
83
84 /**
85 * @zh 服务容器,管理所有服务的注册、解析和生命周期
86 * @en Service container for managing registration, resolution, and lifecycle of all services
87 */
88 private _serviceContainer: ServiceContainer;
89
90 private _timerManager: TimerManager;
91 private _performanceMonitor: PerformanceMonitor;
92 private _poolManager: PoolManager;
93 private _debugManager?: DebugManager;
94
95 /**
96 * @zh 场景管理器,管理当前场景的生命周期
97 * @en Scene manager for managing current scene lifecycle
98 */
99 private _sceneManager: SceneManager;
100
101 /**
102 * @zh World管理器,管理多个独立的World实例(可选)
103 * @en World manager for managing multiple independent World instances (optional)
104 */
105 private _worldManager: WorldManager;
106
107 /**
108 * @zh 插件管理器,管理所有插件的生命周期
109 * @en Plugin manager for managing all plugin lifecycles
110 */
111 private _pluginManager: PluginManager;
112
113 /**
114 * @zh 插件服务注册表,基于 ServiceToken 的类型安全服务注册表
115 * @en Plugin service registry, type-safe service registry based on ServiceToken
116 */

Callers

nothing calls this directly

Calls 1

createLoggerFunction · 0.90

Tested by

no test coverage detected