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/drawables/Powerup.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/drawables/Powerup.ts (limited to 'src/drawables/Powerup.ts') 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() + } +} -- cgit v1.3.1