mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
Cancel click-to-move when keyboard input is detected to improve player control responsiveness
This commit is contained in:
@@ -442,6 +442,12 @@ export function updatePlayerMovement() {
|
||||
}
|
||||
|
||||
function updatePlayerKeyboardMovement() {
|
||||
// Cancel click-to-move when keyboard input is detected
|
||||
if (isMoving || targetPoint) {
|
||||
isMoving = false;
|
||||
targetPoint = null;
|
||||
}
|
||||
|
||||
// Calculate movement direction based on keyboard input
|
||||
let dirX = 0;
|
||||
let dirY = 0;
|
||||
|
||||
Reference in New Issue
Block a user