Input2 Class Reference

Wrap Sce.PlayStation.Core.Input so that input conditional expressions are less verbose. More...

List of all members.

Classes

struct  ButtonState
 Button data structure shared between various helper wrap of Input.GamePad, Input.Touch and the Keyboard. More...
class  GamePad
 Wrap Input.GamePad (button bits). More...
class  GamePadData
 Wrap Input.GamePadData. More...
class  Touch
 Wrap Input.Touch. More...
class  TouchData
 Wrap Input.TouchData. More...

Properties

static TouchData Touch00 [get]
 Alias for Touch.GetData(0)[0].
static GamePadData GamePad0 [get]
 Alias for GamePad.GetData(0)

Detailed Description

Wrap Sce.PlayStation.Core.Input so that input conditional expressions are less verbose.

Some examples:

if ( Input2.GamePad.GetData(0).Left.Down ) // is game pad left button down

if ( Input2.GamePad0.Left.Down ) // same as above, but we use an alias 'GamePad0' for GamePad.GetData(0)

if ( Input2.GamePad0.Square.Release ) // has gamepad square button just been released

if ( Input2.Keyboard0.Left.Press ) // has keyboard left arrow button just been pressed

if ( Input2.Keyboard0.S.On ) // has keyboard S key been held down for more than one frame

Note that you don't have to use Input2. The GameEngine2D library uses it internally in a couple of places and it's used in samples too. It keeps the GetData( deviceIndex ) api but simply harmonizes the state queries for buttons.