From 2b55e05b10857a09c3162fec5ef965da3034e775 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 27 Jan 2023 13:31:21 +0900 Subject: [PATCH] Adjust argon hit lighting further --- .../Skinning/Argon/ArgonMainCirclePiece.cs | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonMainCirclePiece.cs b/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonMainCirclePiece.cs index 2a53122cc1..9e86e1e411 100644 --- a/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonMainCirclePiece.cs +++ b/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonMainCirclePiece.cs @@ -151,10 +151,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon const float shrink_size = 0.8f; - // When the user has hit lighting disabled, we won't be showing the bright white flash. - // To make things look good, the surrounding animations are also slightly adjusted. - bool showFlash = configHitLighting.Value; - // Animating with the number present is distracting. // The number disappearing is hidden by the bright flash. number.FadeOut(flash_in_duration / 2); @@ -186,25 +182,28 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon { outerGradient.ResizeTo(OUTER_GRADIENT_SIZE * shrink_size, resize_duration, Easing.OutElasticHalf); - if (showFlash) - { - outerGradient - .FadeColour(Color4.White, 80) - .Then() - .FadeOut(flash_in_duration); - } - else - { - outerGradient - .FadeColour(Color4.White, flash_in_duration * 8) - .FadeOut(flash_in_duration * 2); - } + outerGradient + .FadeColour(Color4.White, 80) + .Then() + .FadeOut(flash_in_duration); } - if (showFlash) + if (configHitLighting.Value) + { + flash.HitLighting = true; flash.FadeTo(1, flash_in_duration, Easing.OutQuint); - this.FadeOut(showFlash ? fade_out_time : fade_out_time / 2, Easing.OutQuad); + this.FadeOut(fade_out_time, Easing.OutQuad); + } + else + { + flash.HitLighting = false; + flash.FadeTo(1, flash_in_duration, Easing.OutQuint) + .Then() + .FadeOut(flash_in_duration, Easing.OutQuint); + + this.FadeOut(fade_out_time * 0.8f, Easing.OutQuad); + } break; } @@ -236,6 +235,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon Child.AlwaysPresent = true; } + public bool HitLighting { get; set; } + protected override void Update() { base.Update(); @@ -244,7 +245,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon { Type = EdgeEffectType.Glow, Colour = Colour, - Radius = OsuHitObject.OBJECT_RADIUS * 1.2f, + Radius = OsuHitObject.OBJECT_RADIUS * (HitLighting ? 1.2f : 0.6f), }; } }