Move implementation to individual classes

This commit is contained in:
Dean Herbert
2022-09-20 00:06:02 +09:00
parent 4c4fdfd153
commit 46db3ad96d
4 changed files with 46 additions and 17 deletions

View File

@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Framework.Screens;
@ -115,11 +114,19 @@ namespace osu.Game.Screens.Select
var replayGeneratingMod = Mods.Value.OfType<ICreateReplayData>().FirstOrDefault();
if (replayGeneratingMod != null)
player = new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateScoreFromReplayData(beatmap, mods));
{
player = new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateScoreFromReplayData(beatmap, mods))
{
LeaderboardScores = { BindTarget = playBeatmapDetailArea.Leaderboard.Scores }
};
}
else
player = new SoloPlayer();
((IBindableList<ScoreInfo>)player.LeaderboardScores).BindTo(playBeatmapDetailArea.Leaderboard.Scores);
{
player = new SoloPlayer
{
LeaderboardScores = { BindTarget = playBeatmapDetailArea.Leaderboard.Scores }
};
}
return player;
}