diff --git a/frontend/game.ts b/frontend/game.ts index acf5a89..17dd4cd 100644 --- a/frontend/game.ts +++ b/frontend/game.ts @@ -54,7 +54,9 @@ function draw() { }); } -// -// function keyPressed() { -// -// } \ No newline at end of file + +function keyPressed() { + if (key.toLowerCase() == "k") { + raspberry.boost(); + } +} \ No newline at end of file diff --git a/frontend/models/Entity.ts b/frontend/models/Entity.ts index 77f699b..1424271 100644 --- a/frontend/models/Entity.ts +++ b/frontend/models/Entity.ts @@ -30,7 +30,7 @@ abstract class Entity { } //endregion - constructor(position: Position, width: number, height: number, fill: number) { + protected constructor(position: Position, width: number, height: number, fill: number) { this.position = position; this.width = width; this.height = height;