feat(game-loop): implement strict phase rules, exploration stops, and hero attacks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user