From fe4743e68dcbb5085dccb880522c4493f10ddf78 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Tue, 31 Aug 2021 13:58:56 +0200 Subject: [PATCH] fix: level 3 not being completable --- src/game/gameScene.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/gameScene.js b/src/game/gameScene.js index 2115a8b..86991e3 100644 --- a/src/game/gameScene.js +++ b/src/game/gameScene.js @@ -214,10 +214,12 @@ export class GameScene extends Phaser.Scene { } } } + this.fpsText = this.add.bitmapText(0, this.container.height / 2, "gem", ""); this.container.add(this.fpsText); this.propagateWinds(true); this.propagateWinds(); + if(window.location.hostname === "localhost") { this.physics.config.debug = true; this.physics.world.createDebugGraphic(); @@ -426,7 +428,6 @@ export class GameScene extends Phaser.Scene { this.canMove = true; this.player.x = toX; this.player.y = toY; - if(!fromWind && (!this.winds[toX] || !this.winds[toX][toY])) this.checkAngel(); }); } @@ -476,6 +477,8 @@ export class GameScene extends Phaser.Scene { if(this.isWindActive(this.player.x, this.player.y)) { var movement = this.getMovementFromDirection(this.winds[this.player.x][this.player.y].direction); this.movePlayer(movement.x, movement.y, true); + } else { + this.checkAngel(); } var movement = { x: 0, y: 0};