mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08: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
|
public class LegacyTaikoScroller : CompositeDrawable
|
||||||
{
|
{
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private GameplayClock gameplayClock { get; set; }
|
||||||
|
|
||||||
public LegacyTaikoScroller()
|
public LegacyTaikoScroller()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -63,7 +66,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
|||||||
foreach (var sprite in InternalChildren)
|
foreach (var sprite in InternalChildren)
|
||||||
{
|
{
|
||||||
// add the x coordinates and perform re-layout on all sprites as spacing may change with gameplay scale.
|
// 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;
|
additiveX += sprite.DrawWidth - 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user