mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 09:42:54 +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(() =>
|
AddStep("Load scroller", () => SetContents(() =>
|
||||||
new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoScroller), _ => Empty())
|
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 =
|
AddToggleStep("Toggle passing", passing => this.ChildrenOfType<LegacyTaikoScroller>().ForEach(s => s.LastResult.Value =
|
||||||
new JudgementResult(null, new Judgement()) { Type = passing ? HitResult.Perfect : HitResult.Miss }));
|
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;
|
float currentX = (InternalChildren?.FirstOrDefault()?.X ?? 0) - (float)Clock.ElapsedFrameTime * 0.1f;
|
||||||
|
|
||||||
// ensure we have enough sprites
|
// ensure we have enough sprites
|
||||||
if (!wideEnough())
|
while (!wideEnough())
|
||||||
{
|
AddInternal(new ScrollerSprite { Passing = passing });
|
||||||
ClearInternal();
|
|
||||||
|
|
||||||
while (!wideEnough())
|
|
||||||
AddInternal(new ScrollerSprite { Passing = passing });
|
|
||||||
}
|
|
||||||
|
|
||||||
var first = InternalChildren.First();
|
var first = InternalChildren.First();
|
||||||
var last = InternalChildren.Last();
|
var last = InternalChildren.Last();
|
||||||
|
Loading…
Reference in New Issue
Block a user