diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2022-06-01 00:26:52 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2022-06-01 00:26:52 +0200 |
| commit | 5413001f654d4ea27129cf2edfc15322f2ba27ec (patch) | |
| tree | cd5c4bda29622ca5406a7f641143c7c5ead20a51 /src/Player.ts | |
| parent | 0010f2de57cfa97106432ea1849c1bb75d3d99a1 (diff) | |
| download | 1942-5413001f654d4ea27129cf2edfc15322f2ba27ec.tar.gz 1942-5413001f654d4ea27129cf2edfc15322f2ba27ec.tar.zst 1942-5413001f654d4ea27129cf2edfc15322f2ba27ec.zip | |
Spawning enemies, start Startscreen
Diffstat (limited to 'src/Player.ts')
| -rw-r--r-- | src/Player.ts | 11 |
1 files changed, 6 insertions, 5 deletions
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; |
