1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 05:22:54 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyDropletPiece.cs
Bartłomiej Dach 0ae4a0f11f
Adjust gameplay element maximum size limits for backwards compatibility
The new limits were chosen by sampling across over 4000 skins. The
methodology for doing so is described in the following gist:

	https://gist.github.com/bdach/6228ba41d128b23d1f89142f404108a3
2023-10-05 20:37:10 +02:00

30 lines
900 B
C#

// 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;
using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
public partial class LegacyDropletPiece : LegacyCatchHitObjectPiece
{
private static readonly Vector2 droplet_max_size = new Vector2(160);
public LegacyDropletPiece()
{
Scale = new Vector2(0.8f);
}
protected override void LoadComplete()
{
base.LoadComplete();
Texture? texture = Skin.GetTexture("fruit-drop")?.WithMaximumSize(droplet_max_size);
Texture? overlayTexture = Skin.GetTexture("fruit-drop-overlay")?.WithMaximumSize(droplet_max_size);
SetTexture(texture, overlayTexture);
}
}
}