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:
YHH
2025-11-29 23:00:48 +08:00
committed by GitHub
parent f03b73b58e
commit 359886c72f
198 changed files with 33879 additions and 13121 deletions

View File

@@ -27,6 +27,7 @@ export interface UseEngineReturn {
state: EngineState;
start: () => void;
stop: () => void;
step: () => void;
createSprite: (name: string, options?: {
x?: number;
y?: number;
@@ -186,6 +187,12 @@ export function useEngine(
setState((prev) => ({ ...prev, running: false }));
}, []);
// Step single frame (advance one frame when paused)
const step = useCallback(() => {
// Execute a single frame update via Core
Core.update(1 / 60); // Use fixed 60fps timestep for step
}, []);
// Create sprite entity
const createSprite = useCallback((name: string, options?: {
x?: number;
@@ -206,6 +213,7 @@ export function useEngine(
state,
start,
stop,
step,
createSprite,
loadTexture,
viewportId: options.viewportId