feat(game-loop): implement strict phase rules, exploration stops, and hero attacks

This commit is contained in:
2026-01-05 23:11:31 +01:00
parent b619e4cee4
commit 77c0c07a44
11 changed files with 591 additions and 142 deletions

View File

@@ -77,8 +77,9 @@ export class GameRenderer {
const doorIntersects = this.raycaster.intersectObjects(this.exitGroup.children, false);
if (doorIntersects.length > 0) {
const doorMesh = doorIntersects[0].object;
if (doorMesh.userData.isDoor) {
// Clicked on a door! Call onClick with a special door object
// Only capture click if it is a door AND it is NOT open
if (doorMesh.userData.isDoor && !doorMesh.userData.isOpen) {
// Clicked on a CLOSED door! Call onClick with a special door object
onClick(null, null, doorMesh);
return;
}