feat(#8): modularizing
This commit is contained in:
parent
f300fe1be7
commit
32dd2ad599
11 changed files with 271 additions and 94 deletions
12
modules/game-objects/camera.js
Normal file
12
modules/game-objects/camera.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { GameObject } from "./game-object.js";
|
||||
|
||||
export class Camera extends GameObject {
|
||||
constructor({ map, x = 0, y = 0, width = 320, height = 240 }) {
|
||||
super({ x, y });
|
||||
this.map = map;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue