Remove no longer necessary extensions

This commit is contained in:
Salman Ahmed 2020-04-14 04:38:18 +03:00
parent 081a02f748
commit 5f13dc81be
2 changed files with 6 additions and 23 deletions

View File

@ -1,20 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using JetBrains.Annotations;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Skinning
{
internal static class CatchSkinExtensions
{
[NotNull]
public static IBindable<Color4> GetHyperDashFruitColour(this ISkin skin)
=> skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashFruit) ??
skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash) ??
new Bindable<Color4>(Catcher.DEFAULT_HYPER_DASH_COLOUR);
}
}

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Skinning;
using osuTK;
@ -55,14 +56,16 @@ namespace osu.Game.Rulesets.Catch.Skinning
{
var hyperDash = new Sprite
{
Texture = skin.GetTexture(lookupName),
Colour = skin.GetHyperDashFruitColour().Value,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Blending = BlendingParameters.Additive,
Depth = 1,
Alpha = 0.7f,
Scale = new Vector2(1.2f)
Scale = new Vector2(1.2f),
Texture = skin.GetTexture(lookupName),
Colour = skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDashFruit)?.Value ??
skin.GetConfig<CatchSkinColour, Color4>(CatchSkinColour.HyperDash)?.Value ??
Catcher.DEFAULT_HYPER_DASH_COLOUR,
};
AddInternal(hyperDash);