Implement manual player movement planning (steps) and hopping animation

- GameEngine: Added path planning logic (click to add step, re-click to undo).
- GameRenderer: Added path visualization (numbered yellow squares).
- GameRenderer: Updated animation to include 'hopping' effect and clear path markers on visit.
- UIManager: Replaced alerts with modals.
- Main: Wired right-click to execute movement.
This commit is contained in:
2026-01-03 00:15:28 +01:00
parent dbed4468c5
commit 7462dd7fed
4 changed files with 176 additions and 43 deletions

View File

@@ -87,6 +87,10 @@ generator.onDoorBlocked = (exitData) => {
renderer.blockDoor(exitData);
};
game.onPathChange = (path) => {
renderer.updatePathVisualization(path);
};
// 6. Handle Clicks
const handleClick = (x, y, doorMesh) => {
// PRIORITY 1: Tile Placement Mode - ignore all clicks
@@ -134,7 +138,10 @@ const handleClick = (x, y, doorMesh) => {
renderer.setupInteraction(
() => cameraManager.getCamera(),
handleClick,
() => { } // No right-click
() => {
// Right Click Handler
game.executeMovePath();
}
);
// 7. Start