diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 05:30:17 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 05:30:17 -0700 |
commit | cbb88091bdf69cc8752ef1cc3662dc0b99e3ead6 (patch) | |
tree | b10e56d8f5281a9e91db8e2a923f91b216129459 /src/engine/TheAbstractionEngine.ts | |
parent | 4b9349b3f8bee21eb086cfd6e7668532a50e6048 (diff) | |
download | the-abstraction-engine-cbb88091bdf69cc8752ef1cc3662dc0b99e3ead6.tar.gz the-abstraction-engine-cbb88091bdf69cc8752ef1cc3662dc0b99e3ead6.zip |
key lock / player curry collisions
Diffstat (limited to 'src/engine/TheAbstractionEngine.ts')
-rw-r--r-- | src/engine/TheAbstractionEngine.ts | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/engine/TheAbstractionEngine.ts b/src/engine/TheAbstractionEngine.ts index 7f71fd5..e84093f 100644 --- a/src/engine/TheAbstractionEngine.ts +++ b/src/engine/TheAbstractionEngine.ts @@ -1,12 +1,21 @@ import { Game } from "."; import { Miscellaneous, loadAssets } from "./config"; -import { Player, FunctionBox, Wall, LambdaFactory } from "./entities"; +import { + Player, + FunctionBox, + Wall, + LambdaFactory, + Key, + LockedDoor, + Curry, +} from "./entities"; import { Grid, FacingDirection, Input, Render, LambdaFactory as LambdaFactorySpawnSystem, + Collision, } from "./systems"; export class TheAbstractionEngine { @@ -39,6 +48,7 @@ export class TheAbstractionEngine { }, ), new LambdaFactorySpawnSystem(), + new Collision(), new Render(this.ctx), ].forEach((system) => this.game.addSystem(system)); @@ -55,6 +65,15 @@ export class TheAbstractionEngine { const factory = new LambdaFactory({ x: 6, y: 6 }, "λ x . (x)", 10); this.game.addEntity(factory); + + const lockedDoor = new LockedDoor({ x: 8, y: 8 }); + this.game.addEntity(lockedDoor); + + const key = new Key({ x: 7, y: 7 }); + this.game.addEntity(key); + + const curry = new Curry({ x: 9, y: 8 }); + this.game.addEntity(curry); } public play() { |