mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 10:23:04 +08:00
Tidy up JudgementCounter
classes
This commit is contained in:
parent
2d993645af
commit
c46e9cbce3
18
osu.Game/Screens/Play/HUD/JudgementCounter/JudgementCount.cs
Normal file
18
osu.Game/Screens/Play/HUD/JudgementCounter/JudgementCount.cs
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
{
|
||||
public struct JudgementCount
|
||||
{
|
||||
public LocalisableString DisplayName { get; set; }
|
||||
|
||||
public HitResult[] Types { get; set; }
|
||||
|
||||
public BindableInt ResultCount { get; set; }
|
||||
}
|
||||
}
|
@ -67,14 +67,5 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
else
|
||||
count.ResultCount.Value++;
|
||||
}
|
||||
|
||||
public struct JudgementCount
|
||||
{
|
||||
public LocalisableString DisplayName { get; set; }
|
||||
|
||||
public HitResult[] Types { get; set; }
|
||||
|
||||
public BindableInt ResultCount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
@ -19,16 +18,16 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
public BindableBool ShowName = new BindableBool();
|
||||
public Bindable<FillDirection> Direction = new Bindable<FillDirection>();
|
||||
|
||||
public readonly JudgementCountController.JudgementCount Result;
|
||||
public readonly JudgementCount Result;
|
||||
|
||||
public JudgementCounter(JudgementCountController.JudgementCount result) => Result = result;
|
||||
public JudgementCounter(JudgementCount result) => Result = result;
|
||||
|
||||
public OsuSpriteText ResultName = null!;
|
||||
private FillFlowContainer flowContainer = null!;
|
||||
private JudgementRollingCounter counter = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, IBindable<RulesetInfo> ruleset)
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
||||
}
|
||||
}
|
||||
|
||||
private JudgementCounter createCounter(JudgementCountController.JudgementCount info) =>
|
||||
private JudgementCounter createCounter(JudgementCount info) =>
|
||||
new JudgementCounter(info)
|
||||
{
|
||||
State = { Value = Visibility.Hidden },
|
||||
|
Loading…
Reference in New Issue
Block a user