1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 09:03:00 +08:00

Move frequency values into consts

This commit is contained in:
Ron B 2020-08-15 21:19:47 +03:00
parent 40445d0005
commit a1079bac32
No known key found for this signature in database
GPG Key ID: 6F5B32DE5E5FA80C

View File

@ -85,6 +85,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
}
private SkinnableSound spinningSample;
private const float SPINNING_SAMPLE_INITAL_FREQUENCY = 1.0f;
private const float SPINNING_SAMPLE_MODULATED_BASE_FREQUENCY = 0.5f;
protected override void LoadSamples()
{
@ -104,7 +106,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
Volume = { Value = 0 },
Looping = true,
Frequency = { Value = 1.0f }
Frequency = { Value = SPINNING_SAMPLE_INITAL_FREQUENCY }
});
}
}
@ -230,7 +232,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
RotationTracker.Tracking = !Result.HasResult && (OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
if (spinningSample != null && spinnerFrequencyModulate)
spinningSample.Frequency.Value = 0.5f + Progress;
spinningSample.Frequency.Value = SPINNING_SAMPLE_MODULATED_BASE_FREQUENCY + Progress;
}
protected override void UpdateAfterChildren()