mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Handle key counter rewinding in a better way
Use ElapsedFrameTime rather than storing state data
This commit is contained in:
@ -137,9 +137,9 @@ namespace osu.Game.Rulesets.UI
|
||||
{
|
||||
}
|
||||
|
||||
public bool OnPressed(T action) => Target.Children.OfType<KeyCounterAction<T>>().Any(c => c.OnPressed(action));
|
||||
public bool OnPressed(T action) => Target.Children.OfType<KeyCounterAction<T>>().Any(c => c.OnPressed(action, Clock.ElapsedFrameTime > 0));
|
||||
|
||||
public bool OnReleased(T action) => Target.Children.OfType<KeyCounterAction<T>>().Any(c => c.OnReleased(action));
|
||||
public bool OnReleased(T action) => Target.Children.OfType<KeyCounterAction<T>>().Any(c => c.OnReleased(action, Clock.ElapsedFrameTime > 0));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user