ERY.AgateLib.InputCommand< T > Class Reference

Class which encapsulates a set of key codes and joystick buttons that all have the same function. More...

List of all members.

Public Member Functions

void Update ()
 Updates the state of this input command.
void AddKey (KeyCode c)
 Adds a key to the list of buttons which will trigger this command.
void RemoveKey (KeyCode c)
 Removes a key from the list of buttons which will trigger this command.
void AddJoystickButton (int joystickIndex, int button)
 Adds a joystick button to the list of buttons which will trigger this command.
void RemoveJoystickButton (int joystickIndex, int button)
 Removes a joystick button from the list of buttons which trigger this command.
void AddJoystickAxis (int joystickIndex, int axisIndex, bool positiveDirection)
 Adds a joystick axis to the list of buttons which will trigger this command. This treats the axis as if it were a gamepad, only responding of the axis moves pas a value of 0.5.
void SetOn ()
 Sets this command as being on, as if a key or button listed in it was pressed.
void Clear (bool waitForTap)
 Clears the setting on this command, as if all the keys and joystick buttons associated with this command were released.
delegate void InputCommandActivateDelegate (T commandIdentifier)
 Delegate for activation of this command.

Public Attributes

event InputCommandActivateDelegate InputCommandActivate
 Event which fires when this command has been activated, by the user pressing an associated button, or calling the SetOn() method.

Properties

bool RequireTap [get, set]
 Set to true to indicate that this command should not fire another event until the key is released and pressed again.
bool RaiseEvent [get, set]
 Set to true to indicate that this command should fire events when the buttons are pressed (and held, according to the RequireTap setting).
bool Value [get, set]
 Gets or sets whether this command is "pusshed.".


Detailed Description

Class which encapsulates a set of key codes and joystick buttons that all have the same function.

<typeparam name="T"></typeparam>


Member Function Documentation

void ERY.AgateLib.InputCommand< T >.Update (  ) 

Updates the state of this input command.

void ERY.AgateLib.InputCommand< T >.AddKey ( KeyCode  c  ) 

Adds a key to the list of buttons which will trigger this command.

Parameters:
c 

void ERY.AgateLib.InputCommand< T >.RemoveKey ( KeyCode  c  ) 

Removes a key from the list of buttons which will trigger this command.

Parameters:
c 

void ERY.AgateLib.InputCommand< T >.AddJoystickButton ( int  joystickIndex,
int  button 
)

Adds a joystick button to the list of buttons which will trigger this command.

Parameters:
joystickIndex 
button 

void ERY.AgateLib.InputCommand< T >.RemoveJoystickButton ( int  joystickIndex,
int  button 
)

Removes a joystick button from the list of buttons which trigger this command.

Parameters:
joystickIndex 
button 

void ERY.AgateLib.InputCommand< T >.AddJoystickAxis ( int  joystickIndex,
int  axisIndex,
bool  positiveDirection 
)

Adds a joystick axis to the list of buttons which will trigger this command. This treats the axis as if it were a gamepad, only responding of the axis moves pas a value of 0.5.

Parameters:
joystickIndex The index of the joystick, in Input.Joysticks.
axisIndex The index of the axis. 0 is x-axis, 1 is y-axis.
positiveDirection True if the command responds to the positive direction. For example, with the x-axis, if this is true the command will respond to pushing the joystick to the right.

void ERY.AgateLib.InputCommand< T >.SetOn (  ) 

Sets this command as being on, as if a key or button listed in it was pressed.

void ERY.AgateLib.InputCommand< T >.Clear ( bool  waitForTap  ) 

Clears the setting on this command, as if all the keys and joystick buttons associated with this command were released.

Parameters:
waitForTap true indicates that this should not fire events or register as on until the keys associated with it have been released.

delegate void ERY.AgateLib.InputCommand< T >.InputCommandActivateDelegate ( commandIdentifier  ) 

Delegate for activation of this command.

Parameters:
commandIdentifier 


Member Data Documentation

event InputCommandActivateDelegate ERY.AgateLib.InputCommand< T >.InputCommandActivate

Event which fires when this command has been activated, by the user pressing an associated button, or calling the SetOn() method.


Property Documentation

bool ERY.AgateLib.InputCommand< T >.RequireTap [get, set]

Set to true to indicate that this command should not fire another event until the key is released and pressed again.

bool ERY.AgateLib.InputCommand< T >.RaiseEvent [get, set]

Set to true to indicate that this command should fire events when the buttons are pressed (and held, according to the RequireTap setting).

bool ERY.AgateLib.InputCommand< T >.Value [get, set]

Gets or sets whether this command is "pusshed.".


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo