1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 01:02:56 +08:00

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,
Anchor = Anchor.Centre,
IsCounting = true,
Children = new KeyCounter[]
{
new KeyCounterKeyboard(Key.Z),

View File

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

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play
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 @@ namespace osu.Game.Screens.Play
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 @@ namespace osu.Game.Screens.Play
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);