Add maze mini-boss and rebalance progression

This commit is contained in:
2026-08-20 15:19:53 +02:00
parent e6a370f952
commit 1f311d3208
10 changed files with 807 additions and 40 deletions
+22
View File
@@ -0,0 +1,22 @@
import type { Game } from './Game';
import { Ghost } from './Ghost';
const ACTIVATE_RADIUS = 8;
// Labyrinth-Wächter: steht still am Wegpunkt und greift erst an,
// wenn der Spieler in die Nähe kommt.
export class MazeGuard extends Ghost {
private activated = false;
protected chase(dt: number, game: Game) {
if (!this.activated) {
const dx = game.player.body.position.x - this.body.position.x;
const dz = game.player.body.position.z - this.body.position.z;
if (Math.hypot(dx, dz) < ACTIVATE_RADIUS) {
this.activated = true;
}
return;
}
super.chase(dt, game);
}
}