Add ResetCount method for Counter.

This commit is contained in:
Huo Yaoyuan 2016-09-26 14:10:51 +08:00
parent b4bb3d6317
commit bb13da2b32
2 changed files with 8 additions and 0 deletions

View File

@ -120,5 +120,7 @@ namespace osu.Game.Graphics.UserInterface
textLayer.FadeColour(KeyUpTextColor, FadeTime);
}
}
public void ResetCount() => Count = 0;
}
}

View File

@ -28,6 +28,12 @@ namespace osu.Game.Graphics.UserInterface
base.Add(key);
}
public void ResetCount()
{
foreach (var counter in counters)
counter.ResetCount();
}
public override bool Contains(Vector2 screenSpacePos) => true;
//further: change default values here and in KeyCounter if needed, instead of passing them in every constructor