mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix incorrect spawning when scale adjustments are applied to child sprites
This commit is contained in:
parent
c7d8793c1d
commit
e28e89213f
@ -22,7 +22,8 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
AddStep("Load scroller", () => SetContents(() =>
|
||||
new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoScroller), _ => Empty())
|
||||
{
|
||||
Clock = new FramedClock(clock)
|
||||
Clock = new FramedClock(clock),
|
||||
Height = 0.4f,
|
||||
}));
|
||||
AddToggleStep("Toggle passing", passing => this.ChildrenOfType<LegacyTaikoScroller>().ForEach(s => s.LastResult.Value =
|
||||
new JudgementResult(null, new Judgement()) { Type = passing ? HitResult.Perfect : HitResult.Miss }));
|
||||
|
@ -64,13 +64,8 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
float currentX = (InternalChildren?.FirstOrDefault()?.X ?? 0) - (float)Clock.ElapsedFrameTime * 0.1f;
|
||||
|
||||
// ensure we have enough sprites
|
||||
if (!wideEnough())
|
||||
{
|
||||
ClearInternal();
|
||||
|
||||
while (!wideEnough())
|
||||
AddInternal(new ScrollerSprite { Passing = passing });
|
||||
}
|
||||
while (!wideEnough())
|
||||
AddInternal(new ScrollerSprite { Passing = passing });
|
||||
|
||||
var first = InternalChildren.First();
|
||||
var last = InternalChildren.Last();
|
||||
|
Loading…
Reference in New Issue
Block a user