mirror of
https://github.com/ppy/osu
synced 2024-12-17 12:25:19 +00:00
Fix taiko scroller not following gameplay time
This commit is contained in:
parent
d5ae8f5ef4
commit
3b1680583e
@ -17,6 +17,9 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
{
|
||||
public class LegacyTaikoScroller : CompositeDrawable
|
||||
{
|
||||
[Resolved(canBeNull: true)]
|
||||
private GameplayClock gameplayClock { get; set; }
|
||||
|
||||
public LegacyTaikoScroller()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
@ -63,7 +66,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
foreach (var sprite in InternalChildren)
|
||||
{
|
||||
// add the x coordinates and perform re-layout on all sprites as spacing may change with gameplay scale.
|
||||
sprite.X = additiveX ??= sprite.X - (float)Time.Elapsed * 0.1f;
|
||||
sprite.X = additiveX ??= sprite.X - (float)(gameplayClock ?? Clock).ElapsedFrameTime * 0.1f;
|
||||
|
||||
additiveX += sprite.DrawWidth - 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user