1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 22:22:54 +08:00

Demonstrate bug in scrolling container scene

Modify TestSceneScrollingHitObjects to showcase the effect of origin
choice on object lifetime for all four scrolling directions.
This commit is contained in:
Bartłomiej Dach 2019-12-26 20:17:51 +01:00
parent 033bb15500
commit 005ec4b373

View File

@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.Gameplay
RelativeSizeAxes = Axes.Both,
Child = playfields[0] = new TestPlayfield()
},
scrollContainers[1] = new ScrollingTestContainer(ScrollingDirection.Up)
scrollContainers[1] = new ScrollingTestContainer(ScrollingDirection.Down)
{
RelativeSizeAxes = Axes.Both,
Child = playfields[1] = new TestPlayfield()
@ -53,12 +53,12 @@ namespace osu.Game.Tests.Visual.Gameplay
},
new Drawable[]
{
scrollContainers[2] = new ScrollingTestContainer(ScrollingDirection.Up)
scrollContainers[2] = new ScrollingTestContainer(ScrollingDirection.Left)
{
RelativeSizeAxes = Axes.Both,
Child = playfields[2] = new TestPlayfield()
},
scrollContainers[3] = new ScrollingTestContainer(ScrollingDirection.Up)
scrollContainers[3] = new ScrollingTestContainer(ScrollingDirection.Right)
{
RelativeSizeAxes = Axes.Both,
Child = playfields[3] = new TestPlayfield()
@ -207,7 +207,9 @@ namespace osu.Game.Tests.Visual.Gameplay
public TestDrawableHitObject(double time)
: base(new HitObject { StartTime = time })
{
Origin = Anchor.Centre;
Origin = Anchor.Custom;
OriginPosition = new Vector2(75 / 4.0f);
AutoSizeAxes = Axes.Both;
AddInternal(new Box { Size = new Vector2(75) });