avoid using magic numbers

This commit is contained in:
koneko 2025-01-12 12:54:43 +01:00
parent 8e0fc77469
commit 1bb42c4bf7

View File

@ -49,12 +49,9 @@ export class GameScene extends Scene {
if (this.update) this.update(this.ticker.elapsedMS); if (this.update) this.update(this.ticker.elapsedMS);
}); });
this.ticker.start(); this.ticker.start();
const SidebarRect = new PIXI.Rectangle( console.log(Engine.GridCellSize * (Engine.GridColumns + 5) - 360);
Engine.GridCellSize * Engine.GridColumns - 360, console.log(Engine.app.canvas.width - 360);
0, const SidebarRect = new PIXI.Rectangle(Engine.app.canvas.width - 360, 0, 360, Engine.app.canvas.height);
360,
Engine.app.canvas.height
);
const changeRoundButtonRect = new PIXI.Rectangle(50, Engine.app.canvas.height - 100, 310, 100); const changeRoundButtonRect = new PIXI.Rectangle(50, Engine.app.canvas.height - 100, 310, 100);
new Grid(this.mission.gameMap, this.missionIndex); new Grid(this.mission.gameMap, this.missionIndex);
new TowerManager(); new TowerManager();