From 1bb42c4bf774bfdb31b0e618a155d6e85fdd3803 Mon Sep 17 00:00:00 2001 From: koneko <67551503+koneko@users.noreply.github.com> Date: Sun, 12 Jan 2025 12:54:43 +0100 Subject: [PATCH] avoid using magic numbers --- src/scenes/Game.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/scenes/Game.ts b/src/scenes/Game.ts index a157628..19fbc2b 100644 --- a/src/scenes/Game.ts +++ b/src/scenes/Game.ts @@ -49,12 +49,9 @@ export class GameScene extends Scene { if (this.update) this.update(this.ticker.elapsedMS); }); this.ticker.start(); - const SidebarRect = new PIXI.Rectangle( - Engine.GridCellSize * Engine.GridColumns - 360, - 0, - 360, - Engine.app.canvas.height - ); + console.log(Engine.GridCellSize * (Engine.GridColumns + 5) - 360); + console.log(Engine.app.canvas.width - 360); + const SidebarRect = new PIXI.Rectangle(Engine.app.canvas.width - 360, 0, 360, Engine.app.canvas.height); const changeRoundButtonRect = new PIXI.Rectangle(50, Engine.app.canvas.height - 100, 310, 100); new Grid(this.mission.gameMap, this.missionIndex); new TowerManager();