| Property | Defined by | ||
|---|---|---|---|
| A : Boolean | FlxGamepad | ||
| B : Boolean | FlxGamepad | ||
| DOWN : Boolean | FlxGamepad | ||
| L1 : Boolean | FlxGamepad | ||
| L2 : Boolean | FlxGamepad | ||
| LEFT : Boolean | FlxGamepad | ||
| R1 : Boolean | FlxGamepad | ||
| R2 : Boolean | FlxGamepad | ||
| RIGHT : Boolean | FlxGamepad | ||
| SELECT : Boolean | FlxGamepad | ||
| START : Boolean | FlxGamepad | ||
| UP : Boolean | FlxGamepad | ||
| X : Boolean | FlxGamepad | ||
| Y : Boolean | FlxGamepad | ||
| Method | Defined by | ||
|---|---|---|---|
| FlxGamepad | |||
![]() |
addKey(KeyName:String, KeyCode:uint):void
An internal helper function used to build the key array.
| FlxInput | |
|
bind(Up:String = null, Down:String = null, Left:String = null, Right:String = null, AButton:String = null, BButton:String = null, XButton:String = null, YButton:String = null, StartButton:String = null, SelectButton:String = null, L1Button:String = null, L2Button:String = null, R1Button:String = null, R2Button:String = null):void
Assign a keyboard key to a gamepad button.
| FlxGamepad | ||
![]() |
handleKeyDown(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
| FlxInput | |
![]() |
handleKeyUp(event:KeyboardEvent):void
Event handler so FlxGame can toggle keys.
| FlxInput | |
![]() |
justPressed(Key:String):Boolean
Check to see if this key was just pressed.
| FlxInput | |
![]() |
justReleased(Key:String):Boolean
Check to see if this key is just released.
| FlxInput | |
![]() |
pressed(Key:String):Boolean
Check to see if this key is pressed.
| FlxInput | |
![]() |
reset():void
Resets all the keys.
| FlxInput | |
![]() |
update():void
Updates the key states (for tracking just pressed, just released, etc).
| FlxInput | |
| A | property |
public var A:Boolean
| B | property |
public var B:Boolean
| DOWN | property |
public var DOWN:Boolean
| L1 | property |
public var L1:Boolean
| L2 | property |
public var L2:Boolean
| LEFT | property |
public var LEFT:Boolean
| R1 | property |
public var R1:Boolean
| R2 | property |
public var R2:Boolean
| RIGHT | property |
public var RIGHT:Boolean
| SELECT | property |
public var SELECT:Boolean
| START | property |
public var START:Boolean
| UP | property |
public var UP:Boolean
| X | property |
public var X:Boolean
| Y | property |
public var Y:Boolean
| FlxGamepad | () | constructor |
public function FlxGamepad()
| bind | () | method |
public function bind(Up:String = null, Down:String = null, Left:String = null, Right:String = null, AButton:String = null, BButton:String = null, XButton:String = null, YButton:String = null, StartButton:String = null, SelectButton:String = null, L1Button:String = null, L2Button:String = null, R1Button:String = null, R2Button:String = null):void
Assign a keyboard key to a gamepad button. For example, if you pass "X" as the AButton
parameter, this gamepad's member variable A will be set to true whenever the 'x' key
on the keyboard is pressed. Pretty simple! Nice for multiplayer games and utilities that
can convert gamepad pressed to keyboard keys at the operating system level.
Up:String (default = null) |
|
Down:String (default = null) |
|
Left:String (default = null) |
|
Right:String (default = null) |
|
AButton:String (default = null) |
|
BButton:String (default = null) |
|
XButton:String (default = null) |
|
YButton:String (default = null) |
|
StartButton:String (default = null) |
|
SelectButton:String (default = null) |
|
L1Button:String (default = null) |
|
L2Button:String (default = null) |
|
R1Button:String (default = null) |
|
R2Button:String (default = null) |