diff options
Diffstat (limited to 'src/drawables/Powerup.ts')
| -rw-r--r-- | src/drawables/Powerup.ts | 14 |
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() + } +} |
