Provide scores directly to Player instance rather than relying on DI

This commit is contained in:
Dean Herbert
2022-09-16 18:15:17 +09:00
parent 0227eddda1
commit 4c4fdfd153
6 changed files with 24 additions and 39 deletions

View File

@ -10,7 +10,6 @@ using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
@ -18,7 +17,7 @@ using osu.Game.Screens.Play.HUD;
namespace osu.Game.Tests.Visual.Gameplay
{
public class TestSceneSoloGameplayLeaderboard : OsuTestScene, ILeaderboardScoreSource
public class TestSceneSoloGameplayLeaderboard : OsuTestScene
{
[Cached]
private readonly ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());
@ -40,6 +39,7 @@ namespace osu.Game.Tests.Visual.Gameplay
Child = new SoloGameplayLeaderboard(trackingUser)
{
Scores = { BindTarget = scores },
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expanded = { Value = true },
@ -57,8 +57,6 @@ namespace osu.Game.Tests.Visual.Gameplay
AddSliderStep("combo", 0, 1000, 0, v => scoreProcessor.Combo.Value = v);
}
IBindableList<ScoreInfo> ILeaderboardScoreSource.Scores => scores;
private static List<ScoreInfo> createSampleScores()
{
return new[]