From 93d5d4240abfec6936a7e9f2235020683c281f8a Mon Sep 17 00:00:00 2001 From: nine-hundred Date: Sun, 11 Dec 2022 19:42:33 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A7=B5=20=EB=82=B4=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=9C=20=ED=83=80=EC=9D=BC=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4=20=EA=B0=80=EB=8A=A5=ED=95=9C=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=EA=B0=80=20=EC=9E=88=EB=8A=94=EC=A7=80=20=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scenes/game-scene.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/scenes/game-scene.ts b/src/scenes/game-scene.ts index e2d9911..b045dd0 100644 --- a/src/scenes/game-scene.ts +++ b/src/scenes/game-scene.ts @@ -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 {