Midnight Blue Game and Engine
Public Member Functions | Protected Member Functions | Properties | List of all members
MB2D.IO.Command Class Referenceabstract

Executes an action associated with a specific key More...

Inheritance diagram for MB2D.IO.Command:
Inheritance graph
Collaboration diagram for MB2D.IO.Command:
Collaboration graph

Public Member Functions

bool Execute (Entity e=null)
 Executes the specific command on the entity parameter More...
 

Protected Member Functions

 Command (Keys key, CommandType commandType)
 Initializes a new instance of the T:MidnightBlue.Command class. More...
 
abstract void OnKeyPress (Entity e=null)
 Defines the logic to perform when operating on a given entity More...
 

Properties

CommandType Type [get, set]
 Gets or sets the trigger type of the command. More...
 
Keys Key [get]
 Gets the keycode associated with the command. More...
 
bool Disabled [get, set]
 

Detailed Description

Executes an action associated with a specific key

Constructor & Destructor Documentation

§ Command()

MB2D.IO.Command.Command ( Keys  key,
CommandType  commandType 
)
inlineprotected

Initializes a new instance of the T:MidnightBlue.Command class.

Parameters
keyKey to associate with the command
commandTypeTrigger or hold command

Member Function Documentation

§ Execute()

bool MB2D.IO.Command.Execute ( Entity  e = null)
inline

Executes the specific command on the entity parameter

Parameters
eEntity to operate on. Optional

§ OnKeyPress()

abstract void MB2D.IO.Command.OnKeyPress ( Entity  e = null)
protectedpure virtual

Property Documentation

§ Key

Keys MB2D.IO.Command.Key
get

Gets the keycode associated with the command.

The key code

§ Type

CommandType MB2D.IO.Command.Type
getset

Gets or sets the trigger type of the command.

The command type


The documentation for this class was generated from the following file: