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;
|
2020-02-19 12:27:15 +08:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
2020-02-19 12:27:15 +08:00
|
|
|
|
using osu.Game.Skinning;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK;
|
2020-02-19 12:27:15 +08:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|
|
|
|
{
|
|
|
|
|
public class DrawableDroplet : PalpableCatchHitObject<Droplet>
|
|
|
|
|
{
|
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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-19 13:31:14 +08:00
|
|
|
|
protected Container ScaleContainer;
|
2020-02-19 12:27:15 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load()
|
|
|
|
|
{
|
2020-02-19 12:27:15 +08:00
|
|
|
|
AddRangeInternal(new Framework.Graphics.Drawable[]
|
2020-02-19 10:23:45 +08:00
|
|
|
|
{
|
2020-02-19 13:31:14 +08:00
|
|
|
|
ScaleContainer = new Container
|
2020-02-19 12:27:15 +08:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Children = new Framework.Graphics.Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new SkinnableDrawable(
|
|
|
|
|
new CatchSkinComponent(CatchSkinComponents.Droplet), _ => new Pulp
|
|
|
|
|
{
|
|
|
|
|
Size = Size,
|
|
|
|
|
AccentColour = { Value = Color4.White }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-19 10:23:45 +08:00
|
|
|
|
});
|
2020-02-19 12:27:15 +08:00
|
|
|
|
|
2020-02-19 13:31:14 +08:00
|
|
|
|
ScaleContainer.Scale = new Vector2(HitObject.Scale);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|