mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-04 13:54:22 +00:00
hold infinite scroll stuff
This commit is contained in:
parent
4918c4f645
commit
bbdd750d3b
|
@ -453,6 +453,9 @@ class FreeplayState extends MusicBeatSubstate
|
|||
|
||||
var initTouchPos:FlxPoint = new FlxPoint();
|
||||
|
||||
var spamTimer:Float = 0;
|
||||
var spamming:Bool = false;
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
@ -561,6 +564,31 @@ class FreeplayState extends MusicBeatSubstate
|
|||
}
|
||||
#end
|
||||
|
||||
if (controls.UI_UP || controls.UI_DOWN)
|
||||
{
|
||||
spamTimer += elapsed;
|
||||
|
||||
if (spamming)
|
||||
{
|
||||
if (spamTimer >= 0.07)
|
||||
{
|
||||
spamTimer = 0;
|
||||
|
||||
if (controls.UI_UP)
|
||||
changeSelection(-1);
|
||||
else
|
||||
changeSelection(1);
|
||||
}
|
||||
}
|
||||
else if (spamTimer >= 0.9)
|
||||
spamming = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
spamming = false;
|
||||
spamTimer = 0;
|
||||
}
|
||||
|
||||
if (upP)
|
||||
changeSelection(-1);
|
||||
if (downP)
|
||||
|
|
Loading…
Reference in a new issue