From 5413001f654d4ea27129cf2edfc15322f2ba27ec Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Wed, 1 Jun 2022 00:26:52 +0200 Subject: Spawning enemies, start Startscreen --- src/Player.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/Player.ts') diff --git a/src/Player.ts b/src/Player.ts index 171f704..eb76fbe 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -6,17 +6,18 @@ import { keys } from "./Events"; import { IMGS } from "./Images"; export default class Player extends Drawable { - static startx = 250; - static starty = 100; + static startx = 175; + static starty = 155; width = IMGS.playerUp.width; height = IMGS.playerUp.height; - sprite = IMGS.empty; + sprite = IMGS.playerUp; xvel = 0; yvel = 0; lastShoot = 0; stopAtBorder = true; - squares: Rectangle[] = [new Rectangle(this)] + // squares: Rectangle[] = [new Rectangle(this)] + squares: Rectangle[] = [] lifes = 3; power = 2; @@ -54,7 +55,7 @@ export default class Player extends Drawable { this.width = this.sprite.width; this.height = this.sprite.height; - this.squares = [new Rectangle(this)] + // this.squares = [new Rectangle(this)] this.y += this.yvel; this.x += this.xvel; -- cgit v1.3.1