fx.module
README.md
game.fx — Origo Party's celebration effects
A tiny drop-in for the handful of effect presets the board and the arena used from juiceKit. It is Origo Party's own so the world has no external dependency to publish.
local Fx = require("game.fx")
Fx.play("vfxConfetti", { x = 0, y = 3, z = 0 })
Each burst spawns a few short-lived CandyTile slabs in the candy palette that
fly out, spin and shrink. They are spawned local: this is a single-screen
hot-seat game, and a burst only the local peer draws is the whole audience.
Presets
| name | what it is |
|---|---|
vfxConfetti | a wide, high burst — star purchases and round closes |
levelUp | a taller, gold-forward burst |
coinPickup | a small quick sparkle |
pulse | the smallest — a beat on something |
popIn | a short outward pop as something appears |
An unknown name plays nothing and returns 0.
Driving it
Fx.update(dt) advances every live burst and despawns the ones that have run
out. The board and the arena call it from their own update, so a burst can
never outlive the scene that started it. Fx.clear() despawns everything at
once — call it from onDestroy.