feat(#10): remove redundancy
This commit is contained in:
parent
9f1d83bf45
commit
37a7b76d38
5 changed files with 22 additions and 45 deletions
|
@ -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] },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue