1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Make the cursors click every so often

This commit is contained in:
smoogipoo 2019-09-09 13:01:40 +09:00
parent af09ed1b7f
commit 74440dcfdc

View File

@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Tests
{
SetContents(() => new MovingCursorInputManager
{
Child = new OsuCursorContainer
Child = new ClickingCursorContainer
{
RelativeSizeAxes = Axes.Both,
Masking = true,
@ -30,6 +30,21 @@ namespace osu.Game.Rulesets.Osu.Tests
});
}
private class ClickingCursorContainer : OsuCursorContainer
{
protected override void Update()
{
base.Update();
double currentTime = Time.Current;
if (((int)(currentTime / 1000)) % 2 == 0)
OnPressed(OsuAction.LeftButton);
else
OnReleased(OsuAction.LeftButton);
}
}
private class MovingCursorInputManager : ManualInputManager
{
public MovingCursorInputManager()