diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs index 07eb052b20..955deb7f3a 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs @@ -2,10 +2,11 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; +using osu.Framework.Audio.Track; using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; -using osu.Game.Beatmaps; +using osu.Game.Beatmaps.ControlPoints; +using osu.Game.Graphics.Containers; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; using osu.Game.Skinning; @@ -13,8 +14,10 @@ using osuTK; namespace osu.Game.Rulesets.Taiko.Skinning.Legacy { - internal partial class LegacyKiaiGlow : Container + internal partial class LegacyKiaiGlow : BeatSyncedContainer { + private const float colour_compensation = 1.58f; + public LegacyKiaiGlow() { AlwaysPresent = true; @@ -29,13 +32,11 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy Texture = skin.GetTexture("taiko-glow"), Origin = Anchor.Centre, Anchor = Anchor.Centre, - Scale = new Vector2(0.75f), + Scale = new Vector2(0.7f), + Colour = new Colour4(255, 228, 0, 255), }; } - [Resolved(CanBeNull = true)] - private IBeatSyncProvider? beatSyncProvider { get; set; } - [Resolved(CanBeNull = true)] private HealthProcessor? healthProcessor { get; set; } @@ -45,14 +46,6 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy if (healthProcessor != null) healthProcessor.NewJudgement += onNewJudgement; - - if (beatSyncProvider != null) - { - if (beatSyncProvider.CheckIsKiaiTime()) - this.FadeIn(180); - else - this.FadeOut(180); - } } private void onNewJudgement(JudgementResult result) @@ -60,8 +53,16 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy if (!result.IsHit) return; - this.ScaleTo(1.1f, 50) - .Then().ScaleTo(1f, 50); + this.ScaleTo(1.2f) + .Then().ScaleTo(1f, 80, Easing.OutQuad); + } + + protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes) + { + if (effectPoint.KiaiMode) + this.FadeTo(colour_compensation, 180); + else + this.FadeOut(180); } } }