-
Notifications
You must be signed in to change notification settings - Fork 6
score_animator
Produces an animated digit-roll effect that counts up to a target integer. Used by player to animate each result field (score, good, ok, bad, max combo, drumroll) in sequence.
ScoreAnimator(int target);Converts target to a string to determine digit count. Initialises a current_score_list of (digit, counter) pairs — one per digit — all starting at zero. digit_index begins at the last digit.
| Member | Type | Description |
|---|---|---|
target_score |
string |
String representation of the target value |
current_score_list |
vector<pair<int,int>> |
Per-digit (current_digit, counter) state |
digit_index |
int |
Index of the digit currently being animated |
is_finished |
bool |
True once all digits have reached their targets |
std::string next_score();Called once per animation step by player (update_score_animation). Each call either:
- Increments the
counterand cyclescurr_digitby 1 (up to 9 increments per digit), or - Locks the digit to its target value and advances
digit_indexto the next (less significant → more significant order, right to left).
When all digits are locked (digit_index == -1), sets is_finished = true and returns the final value string.
The returned string is formatted to suppress leading zeros: while the animated value is zero and there are still digits being animated, a zero-padded string is returned; once the value becomes non-zero it is returned as a plain integer string.
player calls this at every 50 ms and plays the "num_up" sound when the returned value differs from the target for that field.
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