level builder

This commit is contained in:
2026-05-15 19:26:09 +02:00
parent 0e06d5eefa
commit 5d869b12f1
4 changed files with 227 additions and 17 deletions

View File

@@ -7,8 +7,8 @@ export class Exit extends Phaser.GameObjects.Rectangle {
declare body: Phaser.Physics.Arcade.StaticBody;
constructor(scene: Phaser.Scene, x: number, groundY: number) {
super(scene, x, groundY - Exit.HEIGHT / 2, Exit.WIDTH, Exit.HEIGHT, Exit.COLOR);
constructor(scene: Phaser.Scene, x: number, y: number) {
super(scene, x, y, Exit.WIDTH, Exit.HEIGHT, Exit.COLOR);
scene.add.existing(this);
scene.physics.add.existing(this, true);
}