(matcher?: Matcher)
| 217 | } |
| 218 | |
| 219 | constructor(matcher?: Matcher) { |
| 220 | this._updateOrder = 0; |
| 221 | this._addOrder = 0; |
| 222 | this._enabled = true; |
| 223 | this._performanceMonitor = null; |
| 224 | this._systemName = getSystemInstanceTypeName(this); |
| 225 | this._initialized = false; |
| 226 | this._matcher = matcher || Matcher.empty(); |
| 227 | this._eventListeners = []; |
| 228 | this._scene = null; |
| 229 | this._destroyed = false; |
| 230 | |
| 231 | this._entityIdMap = null; |
| 232 | this._entityIdMapVersion = -1; |
| 233 | |
| 234 | // 初始化logger |
| 235 | this.logger = createLogger(this.getLoggerName()); |
| 236 | |
| 237 | this._entityCache = new EntityCache(); |
| 238 | |
| 239 | // 初始化调度元数据(优先使用装饰器元数据) |
| 240 | // Initialize scheduling metadata (prefer decorator metadata) |
| 241 | const decoratorMeta = getSchedulingMetadata(this); |
| 242 | this._schedulingMetadata = decoratorMeta |
| 243 | ? { ...decoratorMeta } |
| 244 | : { |
| 245 | stage: 'update', |
| 246 | before: [], |
| 247 | after: [], |
| 248 | sets: [] |
| 249 | }; |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * 这个系统所属的场景 |
nothing calls this directly
no test coverage detected