aboutsummaryrefslogtreecommitdiffstats
path: root/src/enemies/Red1.ts
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-06-02 08:54:02 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-06-02 08:54:02 +0200
commit6c37585ef4ef2535aff8c45c64850be0a6c26eab (patch)
treec53e07505182735fbd23687a0c731d4bb2f10e14 /src/enemies/Red1.ts
parent7a494b148dd03d6346a63641fc479015e7450a26 (diff)
download1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.tar.gz
1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.tar.zst
1942-6c37585ef4ef2535aff8c45c64850be0a6c26eab.zip
Death animations
Diffstat (limited to 'src/enemies/Red1.ts')
-rw-r--r--src/enemies/Red1.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/enemies/Red1.ts b/src/enemies/Red1.ts
index 67a8729..9c50820 100644
--- a/src/enemies/Red1.ts
+++ b/src/enemies/Red1.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 Red1 extends Enemy {
@@ -187,7 +187,9 @@ export default class Red1 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()
}
+ shoot(): boolean { return false }
+ deathAnim = getSmallDeathAnim(this)
}