Feature/physics and tilemap enhancement (#247)
* feat(behavior-tree,tilemap): 修复编辑器连线缩放问题并增强插件系统 * feat(node-editor,blueprint): 新增通用节点编辑器和蓝图可视化脚本系统 * feat(editor,tilemap): 优化编辑器UI样式和Tilemap编辑器功能 * fix: 修复CodeQL安全警告和CI类型检查错误 * fix: 修复CodeQL安全警告和CI类型检查错误 * fix: 修复CodeQL安全警告和CI类型检查错误
This commit is contained in:
@@ -6,18 +6,10 @@
|
||||
* Integrates runtime and editor modules
|
||||
*/
|
||||
|
||||
import type { IScene, ServiceContainer } from '@esengine/ecs-framework';
|
||||
import { ComponentRegistry } from '@esengine/ecs-framework';
|
||||
import type {
|
||||
IPluginLoader,
|
||||
IRuntimeModuleLoader,
|
||||
PluginDescriptor,
|
||||
SystemContext
|
||||
} from '@esengine/editor-core';
|
||||
import type { IPluginLoader, PluginDescriptor } from '@esengine/editor-core';
|
||||
|
||||
// Runtime imports
|
||||
import { TilemapComponent } from '../TilemapComponent';
|
||||
import { TilemapRenderingSystem } from '../systems/TilemapRenderingSystem';
|
||||
// Runtime module
|
||||
import { TilemapRuntimeModule } from '../TilemapRuntimeModule';
|
||||
|
||||
// Editor imports
|
||||
import { TilemapEditorModule } from './index';
|
||||
@@ -49,33 +41,12 @@ const descriptor: PluginDescriptor = {
|
||||
}
|
||||
],
|
||||
dependencies: [
|
||||
{ id: '@esengine/core', version: '^1.0.0' }
|
||||
{ id: '@esengine/core', version: '^1.0.0' },
|
||||
{ id: '@esengine/physics-rapier2d', version: '^1.0.0', optional: true }
|
||||
],
|
||||
icon: 'Grid3X3'
|
||||
};
|
||||
|
||||
/**
|
||||
* Tilemap 运行时模块
|
||||
* Tilemap runtime module
|
||||
*/
|
||||
export class TilemapRuntimeModule implements IRuntimeModuleLoader {
|
||||
registerComponents(registry: typeof ComponentRegistry): void {
|
||||
registry.register(TilemapComponent);
|
||||
}
|
||||
|
||||
createSystems(scene: IScene, context: SystemContext): void {
|
||||
const tilemapSystem = new TilemapRenderingSystem();
|
||||
scene.addSystem(tilemapSystem);
|
||||
|
||||
if (context.renderSystem) {
|
||||
context.renderSystem.addRenderDataProvider(tilemapSystem);
|
||||
}
|
||||
|
||||
// 保存引用供其他系统使用 | Save reference for other systems
|
||||
context.tilemapSystem = tilemapSystem;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tilemap 插件加载器
|
||||
* Tilemap plugin loader
|
||||
|
||||
Reference in New Issue
Block a user