1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 04:07:26 +08:00
Commit Graph

5 Commits

Author SHA1 Message Date
Ryuki
b52a07c16a
Use DI to provide dependencies for KPS Calculator and improve input
gathering

KPS Calculator now uses DI to retrieve the clocks. Using `HUDOverlay` it
is now cached for `KeysPerSecondCounter`s to resolve it. This also
allows to make an "Attach" flow like `KeyCounter`.
2022-08-08 21:54:06 +02:00
Ryuki
b2557a8d2d
Refactor KPS
- Remove '#nullable disable' in KeysPerSecondCalculator and
  KeysPerSecondCounter
- Remove KeysPerSecondCalculator IDisposable implementation
- Make KeysPerSecondCalculator static instance initialized once by
  KeysPerSecondCounters
- Auto transfer dependencies from KeysPerSecondCounter to
  KeysPerSecondCalculator using Resolved properties
- Add internal reset logic to KeysPerSecondCalculator and make it
  independent from Player
- Use GameplayClock.TrueGameplayRate to get real-time rate. If 0 then it
  defaults to the last non 0 rate if no such mod is enabled
2022-08-07 00:53:00 +02:00
Ryuki
0886137e39
Prevent KeysPerSecondCounter from NRE when no instance is initialized 2022-08-05 21:03:00 +02:00
Ryuki
24c29b7e2f
Do not add KPS calculation when gameplay rate is 0 2022-08-05 15:51:07 +02:00
Ryuki
42d1bdfc95
Move KPS calculation to a standalone class 2022-08-05 04:17:01 +02:00