From 0010f2de57cfa97106432ea1849c1bb75d3d99a1 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Tue, 31 May 2022 18:11:09 +0200 Subject: All enemies movement --- src/enemies/Enemy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/enemies/Enemy.ts') 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 = [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)) } } -- cgit v1.3.1