2017-10-11 19:28:10 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
2017-10-10 15:34:01 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using OpenTK;
|
|
|
|
|
using OpenTK.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawable.Pieces
|
|
|
|
|
{
|
|
|
|
|
public class Pulp : Circle, IHasAccentColour
|
|
|
|
|
{
|
2017-11-28 17:37:41 +08:00
|
|
|
|
public const float PULP_SIZE = (float)CatchHitObject.OBJECT_RADIUS / 2.2f;
|
2017-10-10 15:34:01 +08:00
|
|
|
|
|
|
|
|
|
public Pulp()
|
|
|
|
|
{
|
|
|
|
|
Size = new Vector2(PULP_SIZE);
|
|
|
|
|
|
|
|
|
|
Blending = BlendingMode.Additive;
|
|
|
|
|
Colour = Color4.White.Opacity(0.9f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Color4 accentColour;
|
|
|
|
|
public Color4 AccentColour
|
|
|
|
|
{
|
|
|
|
|
get { return accentColour; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
accentColour = value;
|
|
|
|
|
|
|
|
|
|
EdgeEffect = new EdgeEffectParameters
|
|
|
|
|
{
|
|
|
|
|
Type = EdgeEffectType.Glow,
|
|
|
|
|
Radius = 5,
|
|
|
|
|
Colour = accentColour.Lighten(100),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|