Fix star counter decrease animation being delayed when current is over displayed star count

This commit is contained in:
Joseph Madamba 2024-01-21 18:47:24 -08:00
parent 6e8d8b977e
commit 7a74eaa2de
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ private void animate(float newValue)
star.ClearTransforms(true);
double delay = Math.Max(current <= newValue ? i - current : current - 1 - i, 0) * AnimationDelay;
double delay = Math.Max(current <= newValue ? i - current : Math.Min(current, StarCount) - 1 - i, 0) * AnimationDelay;
using (star.BeginDelayedSequence(delay))
star.DisplayAt(getStarScale(i, newValue));