diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2022-05-31 18:11:09 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2022-05-31 18:11:09 +0200 |
| commit | 0010f2de57cfa97106432ea1849c1bb75d3d99a1 (patch) | |
| tree | 41e89ff13aacfc4dc1324a365302a0867e316dc9 /src/enemies/Enemy.ts | |
| parent | 344737031e5bbad5f24469aabf45be6535c893f3 (diff) | |
| download | 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.tar.gz 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.tar.zst 1942-0010f2de57cfa97106432ea1849c1bb75d3d99a1.zip | |
All enemies movement
Diffstat (limited to 'src/enemies/Enemy.ts')
| -rw-r--r-- | src/enemies/Enemy.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/enemies/Enemy.ts b/src/enemies/Enemy.ts index 607a612..d85b11e 100644 --- a/src/enemies/Enemy.ts +++ b/src/enemies/Enemy.ts @@ -5,8 +5,10 @@ import Drawable, { Rectangle } from "../Drawable"; export default abstract class Enemy extends Drawable { squares: Array<Rectangle> = [new Rectangle(this)] points = 5; + health = 2 + deathAnim: (string | HTMLImageElement)[] = ["red"] shoot(bullet: Bullet[]) { - bullet.push(new Bullet(this.x + (this.width / 2) - Bullet.width / 2, this.y2, 0, BULLET_VEL, true)) + bullet.push(new Bullet(this.x + (this.width / 2) - Bullet.width / 2, this.y2, 0, BULLET_VEL, false)) } } |
