summaryrefslogtreecommitdiff
path: root/src/engine/systems
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 22:04:57 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 22:04:57 -0700
commit55024f44c3713049c68e4f3f23ecdc3633cd4a24 (patch)
tree5989a20209f7b1e3a06f2eeca70b56a9bd2f7995 /src/engine/systems
parentc3242b171cdbb36a26fda04c7148b9b40a5f5c33 (diff)
downloadthe-abstraction-engine-55024f44c3713049c68e4f3f23ecdc3633cd4a24.tar.gz
the-abstraction-engine-55024f44c3713049c68e4f3f23ecdc3633cd4a24.zip
add function box entity
Diffstat (limited to 'src/engine/systems')
-rw-r--r--src/engine/systems/Grid.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/systems/Grid.ts b/src/engine/systems/Grid.ts
index e4e4bb8..0869fd6 100644
--- a/src/engine/systems/Grid.ts
+++ b/src/engine/systems/Grid.ts
@@ -25,7 +25,7 @@ export class Grid extends System {
.map(() => new Array(columns).fill(null).map(() => new Set()));
}
- public update(dt: number, game: Game): void {
+ public update(dt: number, game: Game) {
this.putUninitializedEntitiesInGrid(game);
this.rebuildGrid(game);
this.updateMovingEntities(dt, game);
@@ -48,6 +48,7 @@ export class Grid extends System {
ComponentNames.BoundingBox,
)!;
boundingBox.center = this.gridToScreenPosition(grid.gridPosition);
+ boundingBox.dimension = this.dimension;
entity.addComponent(boundingBox);
grid.initialized = true;