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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user