修复workerentitysysten和entitysytem的logger重复问题
This commit is contained in:
@@ -195,11 +195,12 @@ export abstract class WorkerEntitySystem<TEntityData = any> extends EntitySystem
|
|||||||
private isProcessing = false;
|
private isProcessing = false;
|
||||||
protected sharedBuffer: SharedArrayBuffer | null = null;
|
protected sharedBuffer: SharedArrayBuffer | null = null;
|
||||||
protected sharedFloatArray: Float32Array | null = null;
|
protected sharedFloatArray: Float32Array | null = null;
|
||||||
private logger = createLogger('WorkerEntitySystem');
|
|
||||||
|
|
||||||
constructor(matcher?: Matcher, config: WorkerSystemConfig = {}) {
|
constructor(matcher?: Matcher, config: WorkerSystemConfig = {}) {
|
||||||
super(matcher);
|
super(matcher);
|
||||||
|
|
||||||
|
this.logger = createLogger('WorkerEntitySystem');
|
||||||
|
|
||||||
// 验证和调整 worker 数量,确保不超过系统最大值
|
// 验证和调整 worker 数量,确保不超过系统最大值
|
||||||
const requestedWorkerCount = config.workerCount ?? this.getMaxSystemWorkerCount();
|
const requestedWorkerCount = config.workerCount ?? this.getMaxSystemWorkerCount();
|
||||||
const maxSystemWorkerCount = this.getMaxSystemWorkerCount();
|
const maxSystemWorkerCount = this.getMaxSystemWorkerCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user