mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:03:22 +08:00
Rename ScorePerformanceManager to ScorePerformanceCache
This commit is contained in:
parent
5113d4af8f
commit
14bb079feb
@ -229,7 +229,7 @@ namespace osu.Game
|
|||||||
dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache());
|
dependencies.Cache(DifficultyCache = new BeatmapDifficultyCache());
|
||||||
AddInternal(DifficultyCache);
|
AddInternal(DifficultyCache);
|
||||||
|
|
||||||
var scorePerformanceManager = new ScorePerformanceManager();
|
var scorePerformanceManager = new ScorePerformanceCache();
|
||||||
dependencies.Cache(scorePerformanceManager);
|
dependencies.Cache(scorePerformanceManager);
|
||||||
AddInternal(scorePerformanceManager);
|
AddInternal(scorePerformanceManager);
|
||||||
|
|
||||||
|
@ -13,9 +13,10 @@ using osu.Game.Beatmaps;
|
|||||||
namespace osu.Game.Scoring
|
namespace osu.Game.Scoring
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A global component which calculates and caches results of performance calculations for locally databased scores.
|
/// A component which performs and acts as a central cache for performance calculations of locally databased scores.
|
||||||
|
/// Currently not persisted between game sessions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ScorePerformanceManager : Component
|
public class ScorePerformanceCache : Component
|
||||||
{
|
{
|
||||||
// this cache will grow indefinitely per session and should be considered temporary.
|
// this cache will grow indefinitely per session and should be considered temporary.
|
||||||
// this whole component should likely be replaced with database persistence.
|
// this whole component should likely be replaced with database persistence.
|
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(ScorePerformanceManager performanceManager)
|
private void load(ScorePerformanceCache performanceCache)
|
||||||
{
|
{
|
||||||
if (score.PP.HasValue)
|
if (score.PP.HasValue)
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
performanceManager.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
|
performanceCache.CalculatePerformanceAsync(score, cancellationTokenSource.Token)
|
||||||
.ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token);
|
.ContinueWith(t => Schedule(() => setPerformanceValue(t.Result)), cancellationTokenSource.Token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user