1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 13:23:21 +08:00

Smoother size changing using linear interpolation

This commit is contained in:
jhk2601 2024-10-11 21:52:13 -04:00
parent 0794fc61a0
commit 4d367515dc

View File

@ -17,6 +17,7 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Rulesets.Osu.UI.Cursor;
using osu.Framework.Utils;
namespace osu.Game.Rulesets.Osu.Mods
{
@ -84,13 +85,14 @@ namespace osu.Game.Rulesets.Osu.Mods
Debug.Assert(osuPlayfield.Cursor != null);
var realCursor = (OsuCursor)osuPlayfield.Cursor.ActiveCursor;
realCursor.isBloom = true;
float currentCombSize = (float)Interpolation.Lerp(osuPlayfield.Cursor.Scale.X, ComboBasedSize, Math.Clamp(osuPlayfield.Time.Elapsed / TRANSITION_DURATION, 0, 1));
if (beBaseSize)
{
realCursor.ComboSize = 1;
}
else
{
realCursor.ComboSize = ComboBasedSize;
realCursor.ComboSize = currentCombSize;
}
}