Skip to main content

Module tween_manager

Module tween_manager 

Source
Expand description

TweenManager — central hub for managing active tweens across the entire game.

The TweenManager owns a pool of ActiveTweens, each targeting a specific property in the scene (glyph position, camera FOV, bar fill, etc.). Every frame, tick(dt) advances all tweens and applies their values.

Features:

  • Start / start_delayed / cancel by ID
  • TweenTarget enum covering glyphs, camera, screen, bars, and custom lambdas
  • Chaining: on_complete callbacks that can start new tweens
  • Group cancellation by tag
  • Automatic cleanup of completed tweens

Structs§

ActiveTween
A single tween that is currently running or waiting (delayed).
BarId
Opaque handle to a UI bar (HP, MP, XP, etc.).
TweenId
Opaque handle to a running tween.
TweenManager
Central tween manager. Owns all active tweens and provides the game-facing API.

Enums§

TweenTarget
What property an active tween drives.