Rename drawable namespace to avoid clashes with framework class

This commit is contained in:
Dean Herbert
2020-02-19 18:01:59 +09:00
parent e1140d7c91
commit ea0bbd2926
17 changed files with 28 additions and 28 deletions

View File

@ -0,0 +1,44 @@
// 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 osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Objects.Drawables.Pieces
{
public class Pulp : Circle
{
public Pulp()
{
RelativePositionAxes = Axes.Both;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
Blending = BlendingParameters.Additive;
Colour = Color4.White.Opacity(0.9f);
}
public readonly Bindable<Color4> AccentColour = new Bindable<Color4>();
protected override void LoadComplete()
{
base.LoadComplete();
AccentColour.BindValueChanged(updateAccentColour, true);
}
private void updateAccentColour(ValueChangedEvent<Color4> colour)
{
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Radius = Size.X / 2,
Colour = colour.NewValue.Darken(0.2f).Opacity(0.75f)
};
}
}
}