From bfe46f0cfa201c9048e15ecb3434fbb14c3974aa Mon Sep 17 00:00:00 2001 From: koneko <67551503+koneko@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:08:54 +0200 Subject: [PATCH] consolidate debugging --- src/base/Assets.ts | 1 + src/components/Grid.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/Assets.ts b/src/base/Assets.ts index af333dc..461d8dc 100644 --- a/src/base/Assets.ts +++ b/src/base/Assets.ts @@ -46,4 +46,5 @@ export default class Assets { public static MissionBackgrounds: PIXI.Texture[] = []; public static Missions: MissionDefinition[]; public static CreepStats: CreepStats[]; + public static DebuggingEnabled: boolean = true; } diff --git a/src/components/Grid.ts b/src/components/Grid.ts index d7d4d75..d47ef7b 100644 --- a/src/components/Grid.ts +++ b/src/components/Grid.ts @@ -40,7 +40,7 @@ export class Cell extends GameObject { this.container.addChild(g); this.container.x = this.bounds.x; this.container.y = this.bounds.y; - return; // comment to enable debugging + if (!Assets.DebuggingEnabled) return; const text = new PIXI.Text({ text: `${this.row}|${this.column}`, style: new PIXI.TextStyle({