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
1 changed files with 16 additions and 1 deletions

View File

@ -22,7 +22,7 @@ private void load()
{
SetContents(() => new MovingCursorInputManager
{
Child = new OsuCursorContainer
Child = new ClickingCursorContainer
{
RelativeSizeAxes = Axes.Both,
Masking = true,
@ -30,6 +30,21 @@ private void load()
});
}
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()