fix: 后退 & 移动速度

This commit is contained in:
AncTe committed 2024-10-03 20:16:25 +08:00
1 parent c6ec4971ee
commit 0b734762b0
3 files changed
+72 -13

No files matched your search

+12 -3
View File
@@ -57,7 +57,7 @@ export function init() {
else {
if (type === 'speed') moveSteps.push(v);
else {
moveSteps.push(...Array(number).fill(type));
moveSteps.push(...Array(Number(number)).fill(type));
}
}
});
@@ -149,10 +149,19 @@ export function init() {
const start: MoveStep = { type: 'speed', value: time };
heroMover.insertMove(...[start, ...resolved]);
const controller = heroMover.startMove();
controller?.onEnd.then(() => {
const controller = heroMover.startMove(true, true, true, false);
if (!controller) {
callback?.();
return;
}
controller.onEnd.then(() => {
callback?.();
});
const animate = fallbackIds++;
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = controller.stop;
};
control.prototype.setHeroLoc = function (