diff options
Diffstat (limited to 'src/enemies/Enemy.ts')
| -rw-r--r-- | src/enemies/Enemy.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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<Rectangle> = [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 } } |
