Remove unnecessary counting change logic

This commit is contained in:
Dean Herbert 2018-07-20 17:08:25 +09:00
parent 82ddbb3f5d
commit 241437c819
5 changed files with 2 additions and 8 deletions

View File

@ -18,7 +18,6 @@ public TestCaseKeyCounter()
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
IsCounting = true,
Children = new KeyCounter[]
{
new KeyCounterKeyboard(Key.Z),

View File

@ -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,

View File

@ -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
{

View File

@ -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; }

View File

@ -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);