Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/scenes/game-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,16 @@ export class GameScene extends Phaser.Scene {
})
}

private checkNowayRouteExistedTile(): boolean {
for (let i = 0; i < this.currentLevelArray.length; i++) {
let tmpBlock = this.currentLevelArray[i];
if (tmpBlock.getType() === 0) continue;
if (tmpBlock.getType() > 10) continue;
if (this.checkNowayRoute) return true;
}
return false;
}

private dx: number[] = [1, -1, 0, 0];
private dy: number[] = [0, 0, 1,-1];
private checkNowayRoute(x: number, y: number): boolean {
Expand Down