WebFreak001 5f3c0549c9 Sprites in blinds mod & gameplay improvements
There are now skinnable actual blinds (shoji screen panels)
The black overlay is still behind them to avoid cheating with skins
The blinds don't open linearly anymore, they are health squared now
When easy mod is on, there is always a little gap open
2018-09-15 23:44:22 +02:00

27 lines
752 B
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
public class ModBlindsPanelSprite : Sprite
{
public ModBlindsPanelSprite()
{
RelativeSizeAxes = Axes.None;
Anchor = Anchor.TopLeft;
}
protected override void Update()
{
Height = Parent?.DrawHeight ?? 0;
if (Height == 0 || Texture is null)
Width = 0;
else
Width = Texture.Width / (float)Texture.Height * Height;
}
}
}