A Controller class using standard controller buttons (XBox360 Controller)

Constructor

new ()

Creates a new Controller instance

Variables

@:value(false)protected:Bool = false

@:value(new Map())state:Map<ControllerButton, Bool> = new Map()

The current state of the controller

Methods

@:dox(show)add ():Void

inlineget_history ():Array<Map<ControllerButton, Bool>>

Returns a history of states for the controller

 *  @return	Array<Map<ControllerButton, Bool>>

inlinejust_pressed (button:ControllerButton):Bool

Gets the just pressed state of a button

 *  @param button	button query
 *  @return			Bool

inlinejust_released (button:ControllerButton):Bool

Gets the just released state of a button

 *  @param button	button query
 *  @return			Bool

inlinepressed (button:ControllerButton):Bool

Gets the pressed state of a button

 *  @param button	button query
 *  @return			Bool

private@:dox(show)set (dt:Float):Void

inlineset_button (button:ControllerButton, pressed:Bool):Void

Set button state

 *  @param button	button to set
 *  @param pressed	whether it's pressed or not

inlineset_max_history (length:Int):Void

Set the maximum number of history states

 *  @param length	length of max history states