From 27fa6357a699771ade4ed5bf8c3fb32d7e73f4d4 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 12 Apr 2022 22:22:33 -0600 Subject: Add menuing system with level select and control changing --- src/systems/grid.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/systems/grid.js') diff --git a/src/systems/grid.js b/src/systems/grid.js index 3e56ea9..6add388 100644 --- a/src/systems/grid.js +++ b/src/systems/grid.js @@ -26,7 +26,9 @@ game.system.Grid = (entitiesGrid) => { } })); changedIds.forEach(id => { - const entity = entities[id]; + // TODO: Figure out why we HAVE to use game.entities rather than entities + // Hint: it breaks when changing a level in the menu + const entity = game.entities[id]; const { x, y } = entity.components.gridPosition; entitiesGrid[y][x].set(entity.id, entity); }); -- cgit v1.2.3-70-g09d2