Skip to content

drum_hit_effect

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

A DrumHitEffect is a short flash that appears on the drum pad graphic when the player presses a key. One instance is created per key press and added to player::draw_drum_hit_list. Instances are removed when is_finished() returns true.

DrumHitEffect

Construction

DrumHitEffect(DrumType type, Side side);
Parameter Description
type DON (red) or KAT (blue)
side LEFT or RIGHT drum pad

Starts fade immediately on construction.

Members

Member Type Description
type DrumType DON or KAT; selects the drum flash texture
side Side Which side of the drum pad to light up
fade FadeAnimation* Controls opacity over the effect's lifetime

Methods

void update(double current_ms);

Advances fade.

void draw(float y);

Draws the drum flash texture on the correct side of the drum graphic, offset by y in 2P layouts.

bool is_finished() const;

Returns true when fade has completed.

Clone this wiki locally