gamepad support and keybind cleaning up

This commit is contained in:
Kade M
2021-06-24 19:54:11 -07:00
parent 5432d66601
commit 06ca64b5d8
13 changed files with 424 additions and 150 deletions

View File

@ -80,6 +80,8 @@ class TitleState extends MusicBeatState
curWacky = FlxG.random.getObject(getIntroTextShit());
trace('hello');
// DEBUG BULLSHIT
super.create();
@ -277,7 +279,7 @@ class TitleState extends MusicBeatState
FlxG.fullscreen = !FlxG.fullscreen;
}
var pressedEnter:Bool = FlxG.keys.justPressed.ENTER;
var pressedEnter:Bool = controls.ACCEPT;
#if mobile
for (touch in FlxG.touches.list)
@ -289,19 +291,6 @@ class TitleState extends MusicBeatState
}
#end
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
if (gamepad != null)
{
if (gamepad.justPressed.START)
pressedEnter = true;
#if switch
if (gamepad.justPressed.B)
pressedEnter = true;
#end
}
if (pressedEnter && !transitioning && skippedIntro)
{
#if !switch