From c6e9baa0009f7cce0f6ff156a3957ef04a8cb684 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 12 Aug 2023 13:49:16 -0600 Subject: the great engine refactor --- server/src/server.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'server/src') diff --git a/server/src/server.ts b/server/src/server.ts index f699ea9..74d901b 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -1,21 +1,17 @@ import { Game } from "../../engine/Game"; import { Floor, Player } from "../../engine/entities"; -import { - WallBounds, - FacingDirection, - Physics, - Input, - Collision, -} from "../../engine/systems"; +import { WallBounds, Physics, Collision } from "../../engine/systems"; import { Miscellaneous } from "../../engine/config"; const TICK_RATE = 60 / 1000; const game = new Game(); -[new Physics(), new Collision(), new WallBounds(Miscellaneous.WIDTH)].forEach( - (system) => game.addSystem(system) -); +[ + new Physics(), + new Collision({ width: Miscellaneous.WIDTH, height: Miscellaneous.HEIGHT }), + new WallBounds(Miscellaneous.WIDTH), +].forEach((system) => game.addSystem(system)); [new Floor(160), new Player()].forEach((entity) => game.addEntity(entity)); -- cgit v1.2.3-70-g09d2