diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2022-06-02 08:54:02 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2022-06-02 08:54:02 +0200 |
| commit | 6c37585ef4ef2535aff8c45c64850be0a6c26eab (patch) | |
| tree | c53e07505182735fbd23687a0c731d4bb2f10e14 /src/enemies/Red2.ts | |
| parent | 7a494b148dd03d6346a63641fc479015e7450a26 (diff) | |
| download | 1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.tar.gz 1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.tar.zst 1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.zip | |
Death animations
Diffstat (limited to 'src/enemies/Red2.ts')
| -rw-r--r-- | src/enemies/Red2.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/enemies/Red2.ts b/src/enemies/Red2.ts index 6cfa672..ced55cd 100644 --- a/src/enemies/Red2.ts +++ b/src/enemies/Red2.ts @@ -1,5 +1,5 @@ import { Rectangle } from "../Drawable"; -import { IMGS } from "../Images"; +import { getSmallDeathAnim, IMGS } from "../Images"; import Enemy from "./Enemy"; export default class Red2 extends Enemy { @@ -96,7 +96,6 @@ export default class Red2 extends Enemy { break; case 16: dy = this.vel - console.log(this.x); break; default: @@ -107,8 +106,11 @@ export default class Red2 extends Enemy { this.y += dy; this.width = this.sprite.width this.height = this.sprite.height - this.squares = [new Rectangle(this, 2, 2, this.width - 2, this.height - 2)] + this.squares = [new Rectangle(this, 2, 2, this.width - 4, this.height - 4)] return this.isOutsideMap() && this.phase > 12 } + shoot(): boolean { return false } + + deathAnim = getSmallDeathAnim(this) } |
