* 批量注册EntitySystem到场景(使用DI) * * 自动按照依赖顺序注册多个System。 * 所有System必须使用@Injectable装饰器标记。 * * @param systemTypes System类型数组 * @returns 注册的System实例数组 * * @example * ```typescript * @Injectable() * @ECSSystem('Collision', { updateOrder: 5 }) * clas
(systemTypes: Array<ServiceType<EntitySystem>>)
| 1183 | * ``` |
| 1184 | */ |
| 1185 | public registerSystems(systemTypes: Array<ServiceType<EntitySystem>>): EntitySystem[] { |
| 1186 | const registeredSystems: EntitySystem[] = []; |
| 1187 | |
| 1188 | for (const systemType of systemTypes) { |
| 1189 | const system = this.addEntityProcessor(systemType); |
| 1190 | registeredSystems.push(system); |
| 1191 | } |
| 1192 | |
| 1193 | return registeredSystems; |
| 1194 | } |
| 1195 | |
| 1196 | /** |
| 1197 | * 添加系统到场景(addEntityProcessor的别名) |
nothing calls this directly
no test coverage detected