From 59536747373395b413d4fa79a43184a4ef0391ef Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Jun 2021 14:06:08 +0900 Subject: [PATCH] Tidy up constants --- osu.Game.Rulesets.Osu/Skinning/Default/CirclePiece.cs | 1 - osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/Default/CirclePiece.cs b/osu.Game.Rulesets.Osu/Skinning/Default/CirclePiece.cs index 0b43704439..cb68d4b7a7 100644 --- a/osu.Game.Rulesets.Osu/Skinning/Default/CirclePiece.cs +++ b/osu.Game.Rulesets.Osu/Skinning/Default/CirclePiece.cs @@ -45,7 +45,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default new KiaiFlash { RelativeSizeAxes = Axes.Both, - FlashOpacity = 0.25f, }, triangles = new TrianglesPiece { diff --git a/osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs b/osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs index a13bcba4c7..d49b1713f6 100644 --- a/osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs +++ b/osu.Game.Rulesets.Osu/Skinning/Default/KiaiFlash.cs @@ -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); } } }