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 @@ namespace osu.Game.Tests.Visual
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
IsCounting = true,
Children = new KeyCounter[] Children = new KeyCounter[]
{ {
new KeyCounterKeyboard(Key.Z), new KeyCounterKeyboard(Key.Z),

View File

@ -195,7 +195,6 @@ namespace osu.Game.Screens.Play
protected virtual KeyCounterCollection CreateKeyCounter() => new KeyCounterCollection protected virtual KeyCounterCollection CreateKeyCounter() => new KeyCounterCollection
{ {
IsCounting = true,
FadeTime = 50, FadeTime = 50,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play
private Container textLayer; private Container textLayer;
private SpriteText countSpriteText; private SpriteText countSpriteText;
public bool IsCounting { get; set; } public bool IsCounting { get; set; } = true;
private int countPresses; private int countPresses;
public int CountPresses public int CountPresses
{ {

View File

@ -53,8 +53,7 @@ namespace osu.Game.Screens.Play
configVisibility.BindValueChanged(_ => updateVisibility(), true); configVisibility.BindValueChanged(_ => updateVisibility(), true);
} }
//further: change default values here and in KeyCounter if needed, instead of passing them in every constructor private bool isCounting = true;
private bool isCounting;
public bool IsCounting public bool IsCounting
{ {
get { return isCounting; } get { return isCounting; }

View File

@ -224,9 +224,6 @@ namespace osu.Game.Screens.Play
RulesetContainer.IsPaused.BindTo(pauseContainer.IsPaused); 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) if (ShowStoryboard)
initializeStoryboard(false); initializeStoryboard(false);