feat(#10): remove redundancy

This commit is contained in:
Juan Sebastián Montoya 2024-09-17 23:16:36 -05:00
parent 9f1d83bf45
commit 37a7b76d38
5 changed files with 22 additions and 45 deletions

View file

@ -10,12 +10,7 @@ export class Camera extends GameObject {
height = GAME_HEIGHT,
speed = 1,
}) {
super({ x, y });
this.gameObjects = gameObjects;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
super({ x, y, gameObjects, width, height });
this.speed = speed;
this.keys = [
{ key: "ArrowUp", pressed: false, value: [0, -1] },