feat(STS) 添加角色技能测试场景

This commit is contained in:
chicrobot committed 2026-01-14 02:38:24 +08:00
1 parent f16f7b6bbd
commit e0ba6f1c9e
6 files changed
+810 -3

No files matched your search

+2 -2
View File
@@ -26,8 +26,8 @@ export class CommandSystem {
// 遍历所有目标单位,调用它们的moveRelative方法进行相对移动
targets.forEach(unit => {
// 确保unit是有效的Unit实例
if (unit && typeof unit.moveRelative === 'function') {
// 确保unit是有效的Unit实例,并且body存在(防止已销毁的单位被调用)
if (unit && typeof unit.moveRelative === 'function' && unit.body) {
unit.moveRelative(dir.x, dir.y);
}
});