2020-12-07 03:57:24 +00: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.Graphics.Textures;
|
2023-09-19 00:17:07 +00:00
|
|
|
using osu.Game.Skinning;
|
2020-12-07 05:00:22 +00:00
|
|
|
using osuTK;
|
2020-12-07 03:57:24 +00:00
|
|
|
|
2021-06-07 06:10:47 +00:00
|
|
|
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
2020-12-07 03:57:24 +00:00
|
|
|
{
|
|
|
|
public partial class LegacyDropletPiece : LegacyCatchHitObjectPiece
|
|
|
|
{
|
2023-10-05 18:37:10 +00:00
|
|
|
private static readonly Vector2 droplet_max_size = new Vector2(160);
|
2023-09-02 23:22:41 +00:00
|
|
|
|
2020-12-07 05:00:22 +00:00
|
|
|
public LegacyDropletPiece()
|
|
|
|
{
|
|
|
|
Scale = new Vector2(0.8f);
|
|
|
|
}
|
|
|
|
|
2020-12-07 03:57:24 +00:00
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
2023-09-19 00:29:43 +00:00
|
|
|
Texture? texture = Skin.GetTexture("fruit-drop")?.WithMaximumSize(droplet_max_size);
|
|
|
|
Texture? overlayTexture = Skin.GetTexture("fruit-drop-overlay")?.WithMaximumSize(droplet_max_size);
|
2020-12-07 03:57:24 +00:00
|
|
|
|
|
|
|
SetTexture(texture, overlayTexture);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|