Save score upon map completion

This commit is contained in:
smoogipoo 2018-11-29 14:56:29 +09:00
parent 8eff49bccd
commit 4c1abdcd8c
1 changed files with 8 additions and 1 deletions

View File

@ -67,6 +67,9 @@ public class Player : ScreenWithBeatmapBackground, IProvideCursor
/// </summary>
private DecoupleableInterpolatingFramedClock adjustableClock;
[Resolved]
private ScoreManager scoreManager { get; set; }
private PauseContainer pauseContainer;
private RulesetInfo ruleset;
@ -273,7 +276,11 @@ private void onCompletion()
{
if (!IsCurrentScreen) return;
Push(new Results(CreateScoreInfo()));
var score = CreateScoreInfo();
if (RulesetContainer.Replay == null)
scoreManager.Import(score);
Push(new Results(score));
onCompletionEvent = null;
});