mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:15:08 +08:00
Make the cursors click every so often
This commit is contained in:
parent
af09ed1b7f
commit
74440dcfdc
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user