2020-08-20 22:34:40 +08:00
|
|
|
// 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.Allocation;
|
2020-11-27 10:40:38 +08:00
|
|
|
using osu.Framework.Bindables;
|
2020-08-20 22:34:40 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
using osuTK;
|
|
|
|
|
2020-11-26 13:26:38 +08:00
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawables.Pieces
|
2020-08-20 22:34:40 +08:00
|
|
|
{
|
|
|
|
public class DropletPiece : CompositeDrawable
|
|
|
|
{
|
2020-11-27 10:40:38 +08:00
|
|
|
public readonly Bindable<bool> HyperDash = new Bindable<bool>();
|
|
|
|
|
2020-08-20 22:34:40 +08:00
|
|
|
public DropletPiece()
|
|
|
|
{
|
|
|
|
Size = new Vector2(CatchHitObject.OBJECT_RADIUS / 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(DrawableHitObject drawableObject)
|
|
|
|
{
|
|
|
|
InternalChild = new Pulp
|
|
|
|
{
|
2020-08-21 11:29:28 +08:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-08-20 22:34:40 +08:00
|
|
|
AccentColour = { BindTarget = drawableObject.AccentColour }
|
|
|
|
};
|
|
|
|
|
2020-11-27 10:40:38 +08:00
|
|
|
if (HyperDash.Value)
|
2020-08-20 22:34:40 +08:00
|
|
|
{
|
2020-11-26 13:36:42 +08:00
|
|
|
AddInternal(new HyperDropletBorderPiece());
|
2020-08-20 22:34:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|