feat(#10): use gba size
This commit is contained in:
parent
abf334607e
commit
9f1d83bf45
2 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
import { TILE_SIZE } from "../constants.js";
|
||||
import { GAME_HEIGHT, GAME_WIDTH, TILE_SIZE } from "../constants.js";
|
||||
import { GameObject } from "./game-object.js";
|
||||
|
||||
export class Camera extends GameObject {
|
||||
|
@ -6,8 +6,8 @@ export class Camera extends GameObject {
|
|||
gameObjects = [],
|
||||
x = 0,
|
||||
y = 0,
|
||||
width = 160,
|
||||
height = 120,
|
||||
width = GAME_WIDTH,
|
||||
height = GAME_HEIGHT,
|
||||
speed = 1,
|
||||
}) {
|
||||
super({ x, y });
|
||||
|
@ -30,7 +30,6 @@ export class Camera extends GameObject {
|
|||
this.eventEmitter.on("changeLevel", () => {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.moveCamera(0, 0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue