one-way platforms

This commit is contained in:
2026-05-15 19:27:18 +02:00
parent 5d869b12f1
commit 1722842e0a
2 changed files with 14 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ export class GameScene extends Phaser.Scene {
this.exit = loaded.exit;
this.platforms = loaded.platforms;
this.physics.add.collider(this.player, this.platforms);
this.physics.add.collider(this.player, this.platforms, undefined, Platform.canLand);
this.physics.add.overlap(this.player, this.exit, () => this.completeLevel());
this.hudText = this.add.text(