C# Class Project290.Menus.MenuAction

This is a link between the pressing of some button on the controller and performing some action through a delegate.
Show file Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
MenuAction ( ActionType actionType, IMenuDelegate menuDelegate ) : System

Initializes a new instance of the MenuAction class.

TryRunDelegate ( ) : void

Tries to run the delegate. This should be called every cycle, as this will check the controller to see if the corresponding action has been performed. If so, and if the delegate is not null, then the delegated action is performed.

Method Details

MenuAction() public method

Initializes a new instance of the MenuAction class.
public MenuAction ( ActionType actionType, IMenuDelegate menuDelegate ) : System
actionType ActionType Type of the action.
menuDelegate IMenuDelegate The menu delegate.
return System

TryRunDelegate() public method

Tries to run the delegate. This should be called every cycle, as this will check the controller to see if the corresponding action has been performed. If so, and if the delegate is not null, then the delegated action is performed.
public TryRunDelegate ( ) : void
return void