Skip to content

Commit 23931df

Browse files
committed
fix: do not move view while jumping
1 parent 028925b commit 23931df

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

model/character.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ export abstract class Character implements IChar {
356356
}
357357

358358
get centerY(): number {
359+
if (this.#isMoving && this.#moveType === "jump") {
360+
return this.#j * CELL_SIZE + CELL_SIZE / 2
361+
}
362+
359363
return this.y + CELL_SIZE / 2
360364
}
361365

0 commit comments

Comments
 (0)