2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|
|
|
|
{
|
|
|
|
|
public class DrawableDroplet : PalpableCatchHitObject<Droplet>
|
|
|
|
|
{
|
|
|
|
|
private Pulp pulp;
|
|
|
|
|
|
2018-06-15 14:44:47 +08:00
|
|
|
|
public override bool StaysOnPlate => false;
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
public DrawableDroplet(Droplet h)
|
|
|
|
|
: base(h)
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
Size = new Vector2((float)CatchHitObject.OBJECT_RADIUS) / 4;
|
|
|
|
|
Masking = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load()
|
|
|
|
|
{
|
2019-03-25 12:47:28 +08:00
|
|
|
|
AddInternal(pulp = new Pulp { Size = Size });
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-07-22 13:45:25 +08:00
|
|
|
|
AccentColour.BindValueChanged(colour => { pulp.AccentColour = colour.NewValue; }, true);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|