Allow skipping the video after holding the screen for 1.5 seconds with touch
This commit is contained in:
@@ -86,12 +86,8 @@ class AttractState extends MusicBeatState
|
||||
});
|
||||
|
||||
add(vid);
|
||||
if (vid.load(filePath))
|
||||
{
|
||||
vid.play();
|
||||
vid.updateHitbox();
|
||||
vid.screenCenter();
|
||||
}
|
||||
|
||||
if (vid.load(filePath)) vid.play();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,8 +100,9 @@ class AttractState extends MusicBeatState
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
// If the user presses any button or holds the screen for 0.8 seconds, skip the video.
|
||||
if ((FlxG.keys.justPressed.ANY && !controls.VOLUME_MUTE && !controls.VOLUME_UP && !controls.VOLUME_DOWN))
|
||||
// If the user presses any button or hold their screen for 1.5 seconds, skip the video.
|
||||
if ((FlxG.keys.justPressed.ANY && !controls.VOLUME_MUTE && !controls.VOLUME_UP && !controls.VOLUME_DOWN) #if TOUCH_CONTROLS
|
||||
|| funkin.util.TouchUtil.touch.ticksDeltaSincePress >= 1500 #end)
|
||||
{
|
||||
onAttractEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user