优化性能结构/延迟加载

新增测试代码用于测试性能
This commit is contained in:
YHH
2025-07-02 00:13:29 +08:00
parent 6bd9c1055c
commit bb19f752a1
23 changed files with 3425 additions and 512 deletions

View File

@@ -42,11 +42,12 @@ export class ECSManager extends Component {
// 1. 创建Core实例启用调试功能
if (this.debugMode) {
Core.create({
debug: true,
enableEntitySystems: true,
debugConfig: {
enabled: true,
websocketUrl: 'ws://localhost:8080',
autoReconnect: true,
updateInterval: 100,
debugFrameRate: 30,
channels: {
entities: true,
@@ -57,9 +58,13 @@ export class ECSManager extends Component {
}
}
});
// ECS调试模式已启用
console.log('✅ ECS调试模式已启用');
} else {
Core.create(false);
Core.create({
debug: false,
enableEntitySystems: true
});
console.log(' ECS调试模式已禁用');
}
// 2. 创建游戏场景