From 036b745425441007a7aa9c377aff4697622b0295 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 21 Jun 2021 08:41:10 +0300 Subject: [PATCH] Remove no longer needed `LegacySpinnerApproachCircle` --- .../Legacy/LegacySpinnerApproachCircle.cs | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySpinnerApproachCircle.cs diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySpinnerApproachCircle.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySpinnerApproachCircle.cs deleted file mode 100644 index d0ce8fbb47..0000000000 --- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySpinnerApproachCircle.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using JetBrains.Annotations; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Sprites; -using osu.Game.Rulesets.Objects.Drawables; -using osu.Game.Rulesets.Osu.Objects.Drawables; -using osu.Game.Skinning; -using osuTK; - -namespace osu.Game.Rulesets.Osu.Skinning.Legacy -{ - public class LegacySpinnerApproachCircle : CompositeDrawable - { - private DrawableSpinner drawableSpinner; - - [CanBeNull] - private Sprite approachCircle; - - [BackgroundDependencyLoader] - private void load(DrawableHitObject drawableHitObject, ISkinSource source) - { - drawableSpinner = (DrawableSpinner)drawableHitObject; - - AutoSizeAxes = Axes.Both; - - var spinnerProvider = source.FindProvider(s => - s.GetTexture("spinner-circle") != null || - s.GetTexture("spinner-top") != null); - - if (spinnerProvider is DefaultLegacySkin) - return; - - InternalChild = approachCircle = new Sprite - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Texture = source.GetTexture("spinner-approachcircle"), - Scale = new Vector2(1.86f), - }; - } - - protected override void LoadComplete() - { - base.LoadComplete(); - - drawableSpinner.ApplyCustomUpdateState += updateStateTransforms; - updateStateTransforms(drawableSpinner, drawableSpinner.State.Value); - } - - private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state) - { - switch (drawableHitObject) - { - case DrawableSpinner spinner: - using (BeginAbsoluteSequence(spinner.HitObject.StartTime)) - approachCircle?.ScaleTo(0.1f, spinner.HitObject.Duration); - - break; - } - } - } -}