aboutsummaryrefslogtreecommitdiffstats
path: root/src/drawables/Powerup.ts
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-06-02 23:13:07 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-06-02 23:16:33 +0200
commitb4defa324a330217f0139f1240bcf53c0b1f996a (patch)
treedeabb94fd351b10d3d6b38d967424149536b3927 /src/drawables/Powerup.ts
parentef76266d1a61c02f1721efedc830fab12279d2b9 (diff)
download1942-b4defa324a330217f0139f1240bcf53c0b1f996a.tar.gz
1942-b4defa324a330217f0139f1240bcf53c0b1f996a.tar.zst
1942-b4defa324a330217f0139f1240bcf53c0b1f996a.zip
v1.0.0
Diffstat (limited to 'src/drawables/Powerup.ts')
-rw-r--r--src/drawables/Powerup.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/drawables/Powerup.ts b/src/drawables/Powerup.ts
new file mode 100644
index 0000000..af4df05
--- /dev/null
+++ b/src/drawables/Powerup.ts
@@ -0,0 +1,14 @@
+import Drawable, { Rectangle } from "../Drawable";
+import { IMGS } from "../Images";
+
+export default class Powerup extends Drawable {
+ sprite = IMGS.powerup
+ width = IMGS.powerup.width
+ height = IMGS.powerup.height
+ squares: Rectangle[] = [new Rectangle(this)]
+
+ move() {
+ this.y += 1
+ return this.isOutsideMap()
+ }
+}