mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:52:54 +08:00
naive 10hz update
This commit is contained in:
parent
b9d2a10530
commit
197ada1a8c
@ -34,6 +34,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
MaxValue = 1.0f,
|
MaxValue = 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private DateTime? lastUpdate;
|
||||||
|
|
||||||
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
||||||
{
|
{
|
||||||
// Hide judgment displays and follow points
|
// Hide judgment displays and follow points
|
||||||
@ -43,6 +45,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public void Update(Playfield playfield)
|
public void Update(Playfield playfield)
|
||||||
{
|
{
|
||||||
|
if (DateTime.Now - (lastUpdate ?? DateTime.MinValue) < TimeSpan.FromMilliseconds(100))
|
||||||
|
return;
|
||||||
|
|
||||||
Vector2 cursorPos = playfield.Cursor.ActiveCursor.DrawPosition;
|
Vector2 cursorPos = playfield.Cursor.ActiveCursor.DrawPosition;
|
||||||
double currentTime = playfield.Clock.CurrentTime;
|
double currentTime = playfield.Clock.CurrentTime;
|
||||||
|
|
||||||
@ -60,6 +65,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
drawable.MoveTo(targetPos, h.StartTime - currentTime);
|
drawable.MoveTo(targetPos, h.StartTime - currentTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastUpdate = DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user