Score -> ScoreInfo

This commit is contained in:
smoogipoo
2018-11-28 18:33:01 +09:00
parent 5b409a5ae5
commit 219929eb47
42 changed files with 211 additions and 211 deletions

View File

@ -273,7 +273,7 @@ namespace osu.Game.Screens.Play
{
if (!IsCurrentScreen) return;
var score = new Score
var score = new ScoreInfo
{
BeatmapInfo = Beatmap.Value.BeatmapInfo,
Ruleset = ruleset

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Ranking
{
public class Results : OsuScreen
{
private readonly Score score;
private readonly ScoreInfo scoreInfo;
private Container circleOuterBackground;
private Container circleOuter;
private Container circleInner;
@ -44,9 +44,9 @@ namespace osu.Game.Screens.Ranking
private const float circle_outer_scale = 0.96f;
public Results(Score score)
public Results(ScoreInfo scoreInfo)
{
this.score = score;
this.scoreInfo = scoreInfo;
}
private const float transition_time = 800;
@ -188,7 +188,7 @@ namespace osu.Game.Screens.Ranking
},
new OsuSpriteText
{
Text = $"{score.MaxCombo}x",
Text = $"{scoreInfo.MaxCombo}x",
TextSize = 40,
RelativePositionAxes = Axes.X,
Font = @"Exo2.0-Bold",
@ -209,7 +209,7 @@ namespace osu.Game.Screens.Ranking
},
new OsuSpriteText
{
Text = $"{score.Accuracy:P2}",
Text = $"{scoreInfo.Accuracy:P2}",
TextSize = 40,
RelativePositionAxes = Axes.X,
Font = @"Exo2.0-Bold",
@ -274,10 +274,10 @@ namespace osu.Game.Screens.Ranking
switch (mode)
{
case ResultMode.Summary:
currentPage = new ResultsPageScore(score, Beatmap.Value);
currentPage = new ResultsPageScore(scoreInfo, Beatmap.Value);
break;
case ResultMode.Ranking:
currentPage = new ResultsPageRanking(score, Beatmap.Value);
currentPage = new ResultsPageRanking(scoreInfo, Beatmap.Value);
break;
}

View File

@ -16,16 +16,16 @@ namespace osu.Game.Screens.Ranking
{
public class ResultsPage : Container
{
protected readonly Score Score;
protected readonly ScoreInfo ScoreInfo;
protected readonly WorkingBeatmap Beatmap;
private CircularContainer content;
private Box fill;
protected override Container<Drawable> Content => content;
public ResultsPage(Score score, WorkingBeatmap beatmap)
public ResultsPage(ScoreInfo scoreInfo, WorkingBeatmap beatmap)
{
Score = score;
ScoreInfo = scoreInfo;
Beatmap = beatmap;
RelativeSizeAxes = Axes.Both;
}

View File

@ -14,7 +14,7 @@ namespace osu.Game.Screens.Ranking
{
public class ResultsPageRanking : ResultsPage
{
public ResultsPageRanking(Score score, WorkingBeatmap beatmap = null) : base(score, beatmap)
public ResultsPageRanking(ScoreInfo scoreInfo, WorkingBeatmap beatmap = null) : base(scoreInfo, beatmap)
{
}
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Ranking
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Beatmap = Beatmap.BeatmapInfo ?? Score.BeatmapInfo,
Beatmap = Beatmap.BeatmapInfo ?? ScoreInfo.BeatmapInfo,
Scale = new Vector2(0.7f)
}
};

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Ranking
private Container scoreContainer;
private ScoreCounter scoreCounter;
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
public ResultsPageScore(ScoreInfo scoreInfo, WorkingBeatmap beatmap) : base(scoreInfo, beatmap) { }
private FillFlowContainer<DrawableScoreStatistic> statisticsContainer;
@ -64,14 +64,14 @@ namespace osu.Game.Screens.Ranking
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new UserHeader(Score.User)
new UserHeader(ScoreInfo.User)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
Height = user_header_height,
},
new DrawableRank(Score.Rank)
new DrawableRank(ScoreInfo.Rank)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -119,7 +119,7 @@ namespace osu.Game.Screens.Ranking
Origin = Anchor.TopCentre,
Margin = new MarginPadding { Bottom = 10 },
},
new DateTimeDisplay(Score.Date.LocalDateTime)
new DateTimeDisplay(ScoreInfo.Date.LocalDateTime)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -166,7 +166,7 @@ namespace osu.Game.Screens.Ranking
}
};
statisticsContainer.ChildrenEnumerable = Score.Statistics.OrderByDescending(p => p.Key).Select(s => new DrawableScoreStatistic(s));
statisticsContainer.ChildrenEnumerable = ScoreInfo.Statistics.OrderByDescending(p => p.Key).Select(s => new DrawableScoreStatistic(s));
}
protected override void LoadComplete()
@ -175,7 +175,7 @@ namespace osu.Game.Screens.Ranking
Schedule(() =>
{
scoreCounter.Increment(Score.TotalScore);
scoreCounter.Increment(ScoreInfo.TotalScore);
int delay = 0;
foreach (var s in statisticsContainer.Children)

View File

@ -34,7 +34,7 @@ namespace osu.Game.Screens.Select.Leaderboards
private readonly IBindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
public Action<Score> ScoreSelected;
public Action<ScoreInfo> ScoreSelected;
private readonly LoadingAnimation loading;
@ -42,9 +42,9 @@ namespace osu.Game.Screens.Select.Leaderboards
private bool scoresLoadedOnce;
private IEnumerable<Score> scores;
private IEnumerable<ScoreInfo> scores;
public IEnumerable<Score> Scores
public IEnumerable<ScoreInfo> Scores
{
get { return scores; }
set

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Select.Leaderboards
public static readonly float HEIGHT = 60;
public readonly int RankPosition;
public readonly Score Score;
public readonly ScoreInfo ScoreInfo;
private const float corner_radius = 5;
private const float edge_margin = 5;
@ -43,9 +43,9 @@ namespace osu.Game.Screens.Select.Leaderboards
private Container flagBadgeContainer;
private FillFlowContainer<ModIcon> modsContainer;
public LeaderboardScore(Score score, int rank)
public LeaderboardScore(ScoreInfo scoreInfo, int rank)
{
Score = score;
ScoreInfo = scoreInfo;
RankPosition = rank;
RelativeSizeAxes = Axes.X;
@ -102,7 +102,7 @@ namespace osu.Game.Screens.Select.Leaderboards
Children = new[]
{
avatar = new DelayedLoadWrapper(
new Avatar(Score.User)
new Avatar(ScoreInfo.User)
{
RelativeSizeAxes = Axes.Both,
CornerRadius = corner_radius,
@ -128,7 +128,7 @@ namespace osu.Game.Screens.Select.Leaderboards
{
nameLabel = new OsuSpriteText
{
Text = Score.User.Username,
Text = ScoreInfo.User.Username,
Font = @"Exo2.0-BoldItalic",
TextSize = 23,
},
@ -149,7 +149,7 @@ namespace osu.Game.Screens.Select.Leaderboards
Masking = true,
Children = new Drawable[]
{
new DrawableFlag(Score.User?.Country)
new DrawableFlag(ScoreInfo.User?.Country)
{
Width = 30,
RelativeSizeAxes = Axes.Y,
@ -166,8 +166,8 @@ namespace osu.Game.Screens.Select.Leaderboards
Margin = new MarginPadding { Left = edge_margin },
Children = new Drawable[]
{
maxCombo = new ScoreComponentLabel(FontAwesome.fa_link, Score.MaxCombo.ToString(), "Max Combo"),
accuracy = new ScoreComponentLabel(FontAwesome.fa_crosshairs, string.Format(Score.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", Score.Accuracy), "Accuracy"),
maxCombo = new ScoreComponentLabel(FontAwesome.fa_link, ScoreInfo.MaxCombo.ToString(), "Max Combo"),
accuracy = new ScoreComponentLabel(FontAwesome.fa_crosshairs, string.Format(ScoreInfo.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", ScoreInfo.Accuracy), "Accuracy"),
},
},
},
@ -183,13 +183,13 @@ namespace osu.Game.Screens.Select.Leaderboards
Spacing = new Vector2(5f, 0f),
Children = new Drawable[]
{
scoreLabel = new GlowingSpriteText(Score.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa")),
scoreLabel = new GlowingSpriteText(ScoreInfo.TotalScore.ToString(@"N0"), @"Venera", 23, Color4.White, OsuColour.FromHex(@"83ccfa")),
new Container
{
Size = new Vector2(40f, 20f),
Children = new[]
{
scoreRank = new DrawableRank(Score.Rank)
scoreRank = new DrawableRank(ScoreInfo.Rank)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -205,7 +205,7 @@ namespace osu.Game.Screens.Select.Leaderboards
Origin = Anchor.BottomRight,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
ChildrenEnumerable = Score.Mods.Select(mod => new ModIcon(mod) { Scale = new Vector2(0.375f) })
ChildrenEnumerable = ScoreInfo.Mods.Select(mod => new ModIcon(mod) { Scale = new Vector2(0.375f) })
},
},
},