AgateLib.InputLib.Old.InputCommand< T > Class Template Reference

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

List of all members.

Classes

class  JoystickAxis
 Class which represents a button-like on a particular joystick.
class  JoystickButton
 Class which represents a button press on a particular joystick.

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.

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.".

Events

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


Detailed Description

template<T>
class AgateLib::InputLib::Old::InputCommand< T >

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

Template Parameters:
T 

Member Function Documentation

template<T >
void AgateLib.InputLib.Old.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.

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.AddJoystickButton ( int  joystickIndex,
int  button 
)

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

Parameters:
joystickIndex 
button 

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.AddKey ( KeyCode  c  ) 

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

Parameters:
c 

template<T >
void AgateLib.InputLib.Old.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.

template<T >
delegate void AgateLib.InputLib.Old.InputCommand< T >.InputCommandActivateDelegate ( commandIdentifier  ) 

Delegate for activation of this command.

Parameters:
commandIdentifier 

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.RemoveJoystickButton ( int  joystickIndex,
int  button 
)

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

Parameters:
joystickIndex 
button 

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.RemoveKey ( KeyCode  c  ) 

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

Parameters:
c 

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.SetOn (  ) 

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

template<T >
void AgateLib.InputLib.Old.InputCommand< T >.Update (  ) 

Updates the state of this input command.


Property Documentation

template<T >
bool AgateLib.InputLib.Old.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).

template<T >
bool AgateLib.InputLib.Old.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.

template<T >
bool AgateLib.InputLib.Old.InputCommand< T >.Value [get, set]

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


Event Documentation

template<T >
InputCommandActivateDelegate AgateLib.InputLib.Old.InputCommand< T >.InputCommandActivate

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


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