Expand description
Game-specific tween presets — ready-to-call functions that wire the tween engine to specific game events: menu navigation, combat, screen transitions, stat changes, level ups, death, victory, and more.
Each function takes a &mut TweenManager and the minimum context needed
(glyph IDs, bar IDs, positions, values), starts the relevant tweens, and
returns the tween IDs for optional cancellation.
Functions§
- boss_
entrance - Boss entrance: dramatic camera + screen effects.
- combat_
hit_ shake - Combat hit screen shake.
- crafting_
forge - Forge: glyphs converge to center and flash.
- crafting_
shatter - Shatter: glyphs explode outward from a center point.
- crit_
damage_ number - Critical hit damage number: bigger arc, gold flash, longer duration.
- damage_
number_ arc - Spawn a damage number arc: rises, scales from big to normal, fades out.
- death_
text_ reveal - “YOU DIED” text scales up from 0 with spring easing.
- entity_
assemble - Assemble entity: glyphs fly in from scattered positions to formation targets.
- entity_
death_ scatter - Entity death: glyphs scatter and fade.
- entity_
hit_ recoil - Entity hit recoil: brief scale squish + position bump.
- heal_
number - Healing number: green, floats up gently.
- hp_
bar_ change - Smoothly animate an HP bar from current to new percentage.
- hp_
bar_ damage - Full HP change: animate both fill and ghost bar.
- hp_
ghost_ bar - Ghost bar (recent damage indicator): delays, then slides down.
- level_
up_ ring - Level up pulse ring: expanding ring of glyphs radiating outward.
- level_
up_ screen_ flash - Level up screen flash.
- menu_
cursor_ pulse - Pulse the cursor glyph’s emission to indicate it’s selected.
- menu_
cursor_ slide - Slide the menu cursor glyph from one Y position to another.
- menu_
select_ flash - Menu selection confirm: flash bright then fade.
- mp_
bar_ change - MP bar smooth change (no ghost).
- pulse_
emission - Pulse a glyph’s emission in a loop (for highlights, cursors, etc.). Returns the tween ID — cancel to stop pulsing.
- room_
cursor_ slide - Slide the room cursor to a new position.
- room_
transition_ pan - Room transition: brief camera pan.
- score_
roll_ up - Score counter rolls up from 0 to final value.
- screen_
crossfade - Theme/screen crossfade: fade out old, swap, fade in new.
- screen_
fade_ through_ black - Instant fade to black, hold, then fade in.
- stat_
decrease_ flash - Flash red when a stat decreases.
- stat_
increase_ flash - Flash a stat glyph gold when a stat increases.
- status_
effect_ apply - Apply a status effect visual: tint + emission pulse.
- typewriter_
reveal - Text typewriter reveal: stagger alpha on each glyph.
- victory_
text_ drop - Victory text entrance: each character drops in with bounce.
- xp_
bar_ fill - XP bar fill (slower, more satisfying).