mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-03 01:54:58 +08:00
fix: 编辑器报错 & 设置勇士朝向
This commit is contained in:
1 parent
80f154694a
commit
ac8a61558e
6 files changed
+28
-2
No files matched your search
@@ -65,6 +65,10 @@ export function init() {
|
||||
return moveSteps;
|
||||
}
|
||||
|
||||
function setHeroDirection(dir: Dir) {
|
||||
if (!heroMover.moving) heroMover.moveDir = dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成跳跃函数
|
||||
*/
|
||||
@@ -164,6 +168,7 @@ export function init() {
|
||||
}
|
||||
if (name === 'direction') {
|
||||
adapters['hero-adapter']?.sync('turn', value);
|
||||
setHeroDirection(value as Dir);
|
||||
} else if (name === 'x') {
|
||||
adapters['hero-adapter']?.sync('setHeroLoc', value);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user