osu/osu.Game.Rulesets.Taiko/Objects/Drawables/Pieces/ElongatedCirclePiece.cs

31 lines
788 B
C#
Raw Normal View History

2018-01-05 11:21:19 +00:00
// 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;
2017-04-18 07:05:58 +00:00
namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
{
public class ElongatedCirclePiece : CirclePiece
{
2017-08-03 10:49:50 +00:00
public ElongatedCirclePiece()
{
2017-08-03 04:23:12 +00:00
RelativeSizeAxes = Axes.Y;
}
protected override void Update()
{
base.Update();
var padding = Content.DrawHeight * Content.Width / 2;
Content.Padding = new MarginPadding
{
Left = padding,
Right = padding,
};
Width = Parent.DrawSize.X + DrawHeight;
}
}
2017-04-21 04:45:11 +00:00
}