mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 09:42:55 +08:00
Move IsCounting to KeyCounter.
This commit is contained in:
parent
409bb0d068
commit
ba19fe1b97
@ -17,7 +17,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
private SpriteText countSpriteText;
|
private SpriteText countSpriteText;
|
||||||
|
|
||||||
public override string Name { get; }
|
public override string Name { get; }
|
||||||
public bool IsCounting { get; set; }
|
public KeyCounter ParentCounter { get; set; }
|
||||||
public int Counts { get; private set; }
|
public int Counts { get; private set; }
|
||||||
|
|
||||||
private bool isLit;
|
private bool isLit;
|
||||||
@ -26,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
get { return isLit; }
|
get { return isLit; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value && !isLit && IsCounting)
|
if (value && !isLit && ParentCounter.IsCounting)
|
||||||
IncreaseCount();
|
IncreaseCount();
|
||||||
if (isLit != value)
|
if (isLit != value)
|
||||||
{
|
{
|
||||||
|
@ -13,8 +13,14 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Direction = FlowDirection.HorizontalOnly;
|
Direction = FlowDirection.HorizontalOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddKey(Count key) => base.Add(key);
|
public void AddKey(Count key)
|
||||||
|
{
|
||||||
|
key.ParentCounter = this;
|
||||||
|
base.Add(key);
|
||||||
|
}
|
||||||
|
|
||||||
public override bool Contains(Vector2 screenSpacePos) => true;
|
public override bool Contains(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
|
public bool IsCounting { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user