mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 01:41:29 +08:00
feat(STS) 添加角色技能测试场景
This commit is contained in:
1 parent
f16f7b6bbd
commit
e0ba6f1c9e
6 files changed
+810
-3
No files matched your search
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user