mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 18:37:32 +09:00
Fix animations not playing correctly in test scene due to too many calls to OnPressed
This commit is contained in:
parent
13618915b7
commit
fee19753e1
@ -69,19 +69,30 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
private class ClickingCursorContainer : OsuCursorContainer
|
private class ClickingCursorContainer : OsuCursorContainer
|
||||||
{
|
{
|
||||||
protected override void Update()
|
private bool pressed;
|
||||||
|
|
||||||
|
public bool Pressed
|
||||||
{
|
{
|
||||||
base.Update();
|
set
|
||||||
|
{
|
||||||
|
if (value == pressed)
|
||||||
|
return;
|
||||||
|
|
||||||
double currentTime = Time.Current;
|
pressed = value;
|
||||||
|
if (value)
|
||||||
if (((int)(currentTime / 1000)) % 2 == 0)
|
|
||||||
OnPressed(OsuAction.LeftButton);
|
OnPressed(OsuAction.LeftButton);
|
||||||
else
|
else
|
||||||
OnReleased(OsuAction.LeftButton);
|
OnReleased(OsuAction.LeftButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
Pressed = ((int)(Time.Current / 1000)) % 2 == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class MovingCursorInputManager : ManualInputManager
|
private class MovingCursorInputManager : ManualInputManager
|
||||||
{
|
{
|
||||||
public MovingCursorInputManager()
|
public MovingCursorInputManager()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user