controls fixed for 3.4.7

This commit is contained in:
Brandon 2020-11-02 15:04:25 -05:00
parent b8701fa703
commit 65de93f679
1 changed files with 31 additions and 0 deletions

View File

@ -197,6 +197,7 @@ class Controls extends FlxActionSet
inline function get_RESET()
return _reset.check();
#if (haxe >= "4.0.0")
public function new(name, scheme = None)
{
super(name);
@ -223,6 +224,36 @@ class Controls extends FlxActionSet
setKeyboardScheme(scheme, false);
}
#else
public function new(name, scheme:KeyboardScheme = null)
{
super(name);
add(_up);
add(_left);
add(_right);
add(_down);
add(_upP);
add(_leftP);
add(_rightP);
add(_downP);
add(_upR);
add(_leftR);
add(_rightR);
add(_downR);
add(_accept);
add(_back);
add(_pause);
add(_reset);
for (action in digitalActions)
byName[action.name] = action;
if (scheme == null)
scheme = None;
setKeyboardScheme(scheme, false);
}
#end
override function update()
{