Class AS::InputPad
In: lib/as_input_pad.rb
Parent: Object

Convenient event handler. Once controls are defined, their values can be read like a hash. Controls can be stacked so a joystick axis or key pair axis can use the same control name.

Methods

[]   []=   action   button   daxis   input   jaxis   jbutton   kaxis   key   new   reset  

Attributes

actions  [R]  Access the actions hash.
dead_zone  [RW]  Set the dead zone for joystick axis used with this pad.

Public Class methods

Public Instance methods

Retrieve the value of a control.

Set the value of a control.

Add an action to this pad to be invoked when a control is updated.

Add a button control to the pad. Event can be any key or button event.

Add an axis control bound to a pair of buttons or keys. (digital axis)

Pass an event.

Add an axis control bound to a joystick axis.

Add a button control bound to a joystick button.

Add an axis control bound to a pair of keys. (key axis)

Add a button control bound to a key.

Remove all defined controls and actions

[Validate]