1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:35:34 +08:00

Tidy up constants

This commit is contained in:
Dean Herbert 2021-06-04 14:06:08 +09:00
parent ff70f99da2
commit 5953674737
2 changed files with 5 additions and 6 deletions

View File

@ -45,7 +45,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
new KiaiFlash
{
RelativeSizeAxes = Axes.Both,
FlashOpacity = 0.25f,
},
triangles = new TrianglesPiece
{

View File

@ -12,7 +12,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public class KiaiFlash : BeatSyncedContainer
{
public float FlashOpacity = 1f;
private const double fade_length = 80;
private const float flash_opacity = 0.25f;
public KiaiFlash()
{
@ -30,14 +32,12 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
{
if (!effectPoint.KiaiMode)
{
return;
}
Child
.FadeTo(FlashOpacity, EarlyActivationMilliseconds, Easing.OutQuint)
.FadeTo(flash_opacity, EarlyActivationMilliseconds, Easing.OutQuint)
.Then()
.FadeOut(timingPoint.BeatLength - 80, Easing.OutSine);
.FadeOut(timingPoint.BeatLength - fade_length, Easing.OutSine);
}
}
}