mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
temp cmt
This commit is contained in:
parent
58bf081096
commit
4d592184ca
@ -34,13 +34,16 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
var ruleset = CreateRuleset();
|
||||
|
||||
var r = ruleset.CreateBeatmapConverter(Beatmap.Value.Beatmap);
|
||||
|
||||
var n = r.Convert().BeatmapInfo.Ruleset.CreateInstance();
|
||||
Debug.Assert(ruleset != null);
|
||||
|
||||
scoreProcessor = new ScoreProcessor(ruleset);
|
||||
scoreProcessor = new ScoreProcessor(n);
|
||||
Child = new DependencyProvidingContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CachedDependencies = new (Type, object)[] { (typeof(ScoreProcessor), scoreProcessor), (typeof(Ruleset), ruleset) },
|
||||
CachedDependencies = new (Type, object)[] { (typeof(ScoreProcessor), scoreProcessor), (typeof(Ruleset), n) },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
judgementTally = new JudgementTally(),
|
||||
|
@ -9,6 +9,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
{
|
||||
@ -29,7 +30,7 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
private JudgementRollingCounter counter = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, DrawableRuleset ruleset)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
InternalChild = flowContainer = new FillFlowContainer
|
||||
@ -44,7 +45,7 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
ResultName = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.Numeric.With(size: 8),
|
||||
Text = Result.ResultInfo.Displayname
|
||||
Text = ruleset.Ruleset.GetDisplayNameForHitResult(Result.ResultInfo.Type)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
@ -21,7 +22,7 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IBindable<WorkingBeatmap> working)
|
||||
{
|
||||
foreach (var result in working.Value.BeatmapInfo.Ruleset.CreateInstance().GetHitResults())
|
||||
foreach (var result in getRuleset(working).GetHitResults())
|
||||
{
|
||||
Results.Add(new JudgementCounterInfo
|
||||
{
|
||||
@ -31,6 +32,14 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
}
|
||||
}
|
||||
|
||||
private Ruleset getRuleset(IBindable<WorkingBeatmap> working)
|
||||
{
|
||||
var ruleset = working.Value.BeatmapInfo.Ruleset.CreateInstance();
|
||||
var converter = ruleset.RulesetInfo.CreateInstance().CreateBeatmapConverter(working.Value.Beatmap);
|
||||
|
||||
return converter.CanConvert() ? converter.Convert().BeatmapInfo.Ruleset.CreateInstance() : ruleset;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
Loading…
Reference in New Issue
Block a user