mirror of
https://github.com/osukey/osukey.git
synced 2025-05-24 23:17:25 +09:00
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
27 lines
752 B
C#
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;
|
|
}
|
|
}
|
|
}
|