fix: 勇士原地踏步

This commit is contained in:
unanmed 2024-11-22 19:51:03 +08:00
parent 0b0d9d2cf5
commit 56365b38df
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ export class HeroKeyMover {
} }
private onPressKey = (code: KeyCode) => { private onPressKey = (code: KeyCode) => {
if (core.isReplaying()) return; if (core.isReplaying() || !core.isPlaying()) return;
core.waitHeroToStop(); core.waitHeroToStop();
if (code === this.hotkeyData.left.key) this.press('left'); if (code === this.hotkeyData.left.key) this.press('left');
else if (code === this.hotkeyData.right.key) this.press('right'); else if (code === this.hotkeyData.right.key) this.press('right');

View File

@ -389,7 +389,7 @@ export class HeroRenderer
render() { render() {
if (!this.renderable) return; if (!this.renderable) return;
if (!this.animate) { if (!this.animate) {
this.renderable.animate = -1; this.renderable.animate = 0;
} else { } else {
this.renderable.animate = this.movingFrame; this.renderable.animate = this.movingFrame;
} }