From b4defa324a330217f0139f1240bcf53c0b1f996a Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Thu, 2 Jun 2022 23:13:07 +0200 Subject: v1.0.0 --- src/enemies/Enemy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/enemies/Enemy.ts') diff --git a/src/enemies/Enemy.ts b/src/enemies/Enemy.ts index 224e66c..cebc1d2 100644 --- a/src/enemies/Enemy.ts +++ b/src/enemies/Enemy.ts @@ -5,13 +5,16 @@ import Anime from "../Animation"; export default abstract class Enemy extends Drawable { squares: Array = [new Rectangle(this)] - points = 5; + points = 50; health = 2 deathAnim!: Anime; + constructor(x: number, y: number) { + super(x, y) + } shoot(bullet: Bullet[]): boolean { if (this.y2 < TOPBAR_HEIGHT) return false - bullet.push(new Bullet(this.x + (this.width / 2) - Bullet.width / 2, this.y2, 0, BULLET_VEL, false)) + bullet.push(new Bullet(this.x + (this.width / 2) - Bullet.width / 2, this.y2, 0, BULLET_VEL / 1.5, false)) return true } } -- cgit v1.3.1