From ebae24f5a3a251654a1e41be58f52ba2a777d9d7 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 7 Mar 2024 22:49:43 -0700 Subject: level system! --- src/engine/systems/Grid.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/engine/systems/Grid.ts') diff --git a/src/engine/systems/Grid.ts b/src/engine/systems/Grid.ts index 1ec8ed9..c504bfe 100644 --- a/src/engine/systems/Grid.ts +++ b/src/engine/systems/Grid.ts @@ -377,4 +377,11 @@ export class Grid extends System { this.grid[y][x].add(id); }); } + + public getCenterGrid() { + return { + x: Math.floor(this.grid[0].length / 2), + y: Math.floor(this.grid.length / 2), + }; + } } -- cgit v1.2.3-70-g09d2