Skip to content

balloon_counter

Anthony Samms edited this page Jun 2, 2026 · 1 revision

The BalloonCounter displays the number of remaining hits needed to pop a balloon note. It appears when a balloon note is entered, counts down with each hit, and then fades out when the balloon is popped or missed. Owned by player as optional<BalloonCounter>.

BalloonCounter

Construction

BalloonCounter(int count, bool is_2p);
Parameter Description
count Total hits required to pop the balloon
is_2p Adjusts the display position for 2P layouts

Members

Member Type Description
balloon_count int Remaining hits needed to pop
balloon_total int Original total hits (set at construction)
is_popped bool Set to true when the balloon is popped
is_2p bool Whether this counter is in the P2 position
stretch TextStretchAnimation* Short scale pulse on each hit
fade FadeAnimation* Fade-out played when the balloon ends

Methods

void update_count(int count);

Updates balloon_count and triggers the stretch animation. Called each time the player hits the balloon.

void update(double current_ms, int count);

Advances stretch and fade. If count drops to zero and is_popped is not yet set, starts fade and sets is_popped = true.

void draw(float y);

Draws the remaining hit count at its configured position, offset by y in 2P mode.

bool is_finished() const;

Returns true when fade has completed, indicating the counter can be discarded.

Clone this wiki locally