1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Fix TestSceneHitExplosion not maintaining aspect ratio

This commit is contained in:
Dean Herbert 2022-11-02 16:55:17 +09:00
parent c66064872a
commit 0689d3845f

View File

@ -13,6 +13,7 @@ using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko.Objects; using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.UI; using osu.Game.Rulesets.Taiko.UI;
using osu.Game.Screens.Ranking;
namespace osu.Game.Rulesets.Taiko.Tests.Skinning namespace osu.Game.Rulesets.Taiko.Tests.Skinning
{ {
@ -49,12 +50,20 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
// the hit needs to be added to hierarchy in order for nested objects to be created correctly. // the hit needs to be added to hierarchy in order for nested objects to be created correctly.
// setting zero alpha is supposed to prevent the test from looking broken. // setting zero alpha is supposed to prevent the test from looking broken.
hit.With(h => h.Alpha = 0), hit.With(h => h.Alpha = 0),
new AspectContainer
{
RelativeSizeAxes = Axes.X,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Child =
new HitExplosion(hit.Type) new HitExplosion(hit.Type)
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
}.With(explosion => explosion.Apply(hit)) }.With(explosion => explosion.Apply(hit))
} }
}
}; };
} }