From 4b3cfe3baec4d44d7a5f04d5398199ca1d95eb00 Mon Sep 17 00:00:00 2001 From: mcendu Date: Sun, 22 Dec 2019 20:01:58 +0800 Subject: [PATCH] temporarily remove kiai flash for legacy circles --- .../Objects/Drawables/Pieces/CirclePiece.cs | 10 +------- .../Objects/Drawables/Pieces/KiaiFlash.cs | 23 +++++++++++++------ .../Skinning/LegacyMainCirclePiece.cs | 21 ----------------- 3 files changed, 17 insertions(+), 37 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/CirclePiece.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/CirclePiece.cs index eba3a02376..8d68714f9a 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/CirclePiece.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/CirclePiece.cs @@ -6,9 +6,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; -using osu.Framework.Graphics.Shapes; using osuTK; -using osuTK.Graphics; namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { @@ -40,13 +38,7 @@ private void load(TextureStore textures) new KiaiFlash { RelativeSizeAxes = Axes.Both, - Intensity = 0.25f, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White, - Alpha = 0f, - }, + FlashOpacity = 0.25f, }, new TrianglesPiece { diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/KiaiFlash.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/KiaiFlash.cs index 379deff8bf..62ea028b11 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/KiaiFlash.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/KiaiFlash.cs @@ -3,30 +3,39 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; -using osu.Game.Graphics; using osu.Game.Graphics.Containers; +using osuTK.Graphics; namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { public class KiaiFlash : BeatSyncedContainer { - public float Intensity { get; set; } + public float FlashOpacity = 1f; public KiaiFlash() { EarlyActivationMilliseconds = 80; Blending = BlendingParameters.Additive; + + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White, + Alpha = 0f, + }; } protected override void OnNewBeat(int beatIndex, Game.Beatmaps.ControlPoints.TimingControlPoint timingPoint, Game.Beatmaps.ControlPoints.EffectControlPoint effectPoint, Framework.Audio.Track.TrackAmplitudes amplitudes) { - if (effectPoint.KiaiMode) + if (!effectPoint.KiaiMode) { - Child - .FadeTo(Intensity, EarlyActivationMilliseconds, Easing.OutQuint) - .Then() - .FadeOut(timingPoint.BeatLength - 80, Easing.OutSine); + return; } + + Child + .FadeTo(FlashOpacity, EarlyActivationMilliseconds, Easing.OutQuint) + .Then() + .FadeOut(timingPoint.BeatLength - 80, Easing.OutSine); } } } diff --git a/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs b/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs index 27f9e008ed..93ae0371df 100644 --- a/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs +++ b/osu.Game.Rulesets.Osu/Skinning/LegacyMainCirclePiece.cs @@ -6,12 +6,10 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects; -using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; using osu.Game.Skinning; using osuTK; using osuTK.Graphics; @@ -46,25 +44,6 @@ private void load(DrawableHitObject drawableObject, ISkinSource skin) Anchor = Anchor.Centre, Origin = Anchor.Centre, }, - new KiaiFlash - { - RelativeSizeAxes = Axes.Both, - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Size = new Vector2(OsuLegacySkinTransformer.LEGACY_CIRCLE_RADIUS / 64), - - Masking = true, - CornerRadius = Size.X / 2, - CornerExponent = 2, - - Intensity = 0.1f, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White, - Alpha = 0f, - } - }, hitCircleText = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText { Font = OsuFont.Numeric.With(size: 40),