feat(#15): fix centering player issue
This commit is contained in:
parent
9403de1042
commit
e2cd0ee490
1 changed files with 3 additions and 1 deletions
|
@ -92,8 +92,10 @@ export class Player extends GameObject {
|
||||||
x = 0,
|
x = 0,
|
||||||
y = 0,
|
y = 0,
|
||||||
speed = 1,
|
speed = 1,
|
||||||
|
width = TILE_SIZE,
|
||||||
|
height = TILE_SIZE,
|
||||||
}) {
|
}) {
|
||||||
super({ x, y, gameObjects });
|
super({ x, y, gameObjects, width, height });
|
||||||
this.speed = speed;
|
this.speed = speed;
|
||||||
this.keys = [
|
this.keys = [
|
||||||
{ key: "ArrowUp", pressed: false, value: [0, -1] },
|
{ key: "ArrowUp", pressed: false, value: [0, -1] },
|
||||||
|
|
Loading…
Reference in a new issue