-
Notifications
You must be signed in to change notification settings - Fork 6
score_counter_animation
A ScoreCounterAnimation is a short-lived floating number that pops up at the note lane each time the player earns score for a note hit. It shows the base score value and slides upward before fading out. player keeps active instances in base_score_list and removes them when is_finished() returns true.
ScoreCounterAnimation(PlayerNum player_num, int counter);| Parameter | Description |
|---|---|
player_num |
Determines the horizontal position in 2P layouts |
counter |
The score value to display (positive or negative) |
Computes the string representation and colour based on whether counter is positive or negative, then starts all animations immediately.
| Member | Type | Description |
|---|---|---|
counter |
int |
Score value being displayed |
direction |
int |
+1 for positive score, -1 for a penalty |
fade_animation_1 |
FadeAnimation* |
Fade-in |
move_animation_1 |
MoveAnimation* |
Initial upward slide |
fade_animation_2 |
FadeAnimation* |
Fade-out |
move_animation_2 |
MoveAnimation* |
Secondary upward drift during fade-out |
move_animation_3 |
MoveAnimation* |
Horizontal motion (used for gogo-time colour shifts) |
move_animation_4 |
MoveAnimation* |
Additional drift |
base_color |
ray::Color |
Starting colour (orange for positive, grey for negative) |
color |
ray::Color |
Currently interpolated colour |
counter_str |
string |
Formatted score string |
total_width |
float |
Total pixel width of the digit string |
margin |
float |
Inter-digit spacing |
y_pos_list |
vector<float> |
Per-digit vertical positions, animated individually |
void update(double current_ms);Advances all animations and interpolates color.
void draw(float y);Draws each digit of counter_str at its current animated position, offset by y for 2P.
bool is_finished() const;Returns true when fade_animation_2 has completed.
Building
libs
- animation
- audio
- config
- filesystem
- global_data
- input
- logging
- ray
- scores
- screen
- script
- song_parser
- text
- texture
- video
- webcam
libs/parsers
objects
objects/game
- player
- background
- gauge
- judgment
- combo
- branch_indicator
- ending_animations
- gogo_time
- fireworks
- song_info
- transition
- result_transition
- judge_counter
- score_counter
- score_counter_animation
- balloon_counter
- drumroll_counter
- kusudama_counter
- drum_hit_effect
- lane_hit_effect
- gauge_hit_effect
- combo_announce
- note_arc
objects/global
objects/title
objects/entry
objects/settings
objects/result
objects/song_select
- player
- navigator
- box_base
- box_song
- box_folder
- neiro
- modifier
- ura_switch
- diff_sort
- search_box
- dan_transition
- genre_bg
- score_history
- song_select_script
scenes