C# Class Afterglow.Input.ButtonAction

Action for a button and the information when the button is triggered.
Inheritance: IButtonState, IButtonAction
Datei anzeigen Open project: Christof/afterglow Class Usage Examples

Public Methods

Method Description
ButtonAction ( Button button ) : System

Initializes a new instance of the ButtonAction class.

Do ( System.Action action ) : void

Sets the given action to be executed if the button is down or was pressed.

ExecuteAction ( ) : void

Executes the action.

IsDown ( ) : IButtonAction

The action will be triggered if the button is pressed.

WasPressed ( ) : IButtonAction

The action will be triggered if the button was pressed.

WasReleased ( ) : IButtonAction

The action will be triggered if the button was released.

Method Details

ButtonAction() public method

Initializes a new instance of the ButtonAction class.
public ButtonAction ( Button button ) : System
button Button The button.
return System

Do() public method

Sets the given action to be executed if the button is down or was pressed.
public Do ( System.Action action ) : void
action System.Action The action.
return void

ExecuteAction() public method

Executes the action.
public ExecuteAction ( ) : void
return void

IsDown() public method

The action will be triggered if the button is pressed.
public IsDown ( ) : IButtonAction
return IButtonAction

WasPressed() public method

The action will be triggered if the button was pressed.
public WasPressed ( ) : IButtonAction
return IButtonAction

WasReleased() public method

The action will be triggered if the button was released.
public WasReleased ( ) : IButtonAction
return IButtonAction