camera punch
Problem it solves
A heavy boss lands on the ground and you want a sudden, sharp camera jolt before it snaps back to normal.
What this block does
Offsets the camera violently in a random direction for a brief moment and then centers it back.
The block
Block ID: retro_camera_punch
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| sprite | Sprite | Object | The sprite triggering the camera punch. |
| intensity | number | 4 | Maximum pixel distance to offset the camera. |
| duration | number | 60 | Duration of the camera offset in milliseconds. |
Example
let hero = sprites.create(img`.`, SpriteKind.Player) Retro.cameraPunch(hero, 8, 80)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.