mirror of https://github.com/ppy/osu
Remove unnecessary counting change logic
This commit is contained in:
parent
82ddbb3f5d
commit
241437c819
|
@ -18,7 +18,6 @@ public TestCaseKeyCounter()
|
|||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
IsCounting = true,
|
||||
Children = new KeyCounter[]
|
||||
{
|
||||
new KeyCounterKeyboard(Key.Z),
|
||||
|
|
|
@ -195,7 +195,6 @@ protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
|||
|
||||
protected virtual KeyCounterCollection CreateKeyCounter() => new KeyCounterCollection
|
||||
{
|
||||
IsCounting = true,
|
||||
FadeTime = 50,
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
|
|
|
@ -19,7 +19,7 @@ public abstract class KeyCounter : Container
|
|||
private Container textLayer;
|
||||
private SpriteText countSpriteText;
|
||||
|
||||
public bool IsCounting { get; set; }
|
||||
public bool IsCounting { get; set; } = true;
|
||||
private int countPresses;
|
||||
public int CountPresses
|
||||
{
|
||||
|
|
|
@ -53,8 +53,7 @@ private void load(OsuConfigManager config)
|
|||
configVisibility.BindValueChanged(_ => updateVisibility(), true);
|
||||
}
|
||||
|
||||
//further: change default values here and in KeyCounter if needed, instead of passing them in every constructor
|
||||
private bool isCounting;
|
||||
private bool isCounting = true;
|
||||
public bool IsCounting
|
||||
{
|
||||
get { return isCounting; }
|
||||
|
|
|
@ -224,9 +224,6 @@ private void load(AudioManager audio, APIAccess api, OsuConfigManager config)
|
|||
|
||||
RulesetContainer.IsPaused.BindTo(pauseContainer.IsPaused);
|
||||
|
||||
// schedule to ensure we count any key presses from the current frame (which may affect gameplay).
|
||||
RulesetContainer.IsPaused.ValueChanged += paused => Schedule(() => hudOverlay.KeyCounter.IsCounting = !paused);
|
||||
|
||||
if (ShowStoryboard)
|
||||
initializeStoryboard(false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue