Class ObjectComponentMove
Moves a IScreenObject with the arrow keys.
Implements
Inherited Members
Namespace: SadConsole.Components
Assembly: SadConsole.dll
Syntax
public class ObjectComponentMove : KeyboardConsoleComponent, IComponent
Constructors
ObjectComponentMove()
Creates a new instance of the object with an Amount of 1.
Declaration
public ObjectComponentMove()
Properties
Amount
The amount to move the object by.
Declaration
public int Amount { get; set; }
Property Value
Type | Description |
---|---|
int |
DownKey
Declaration
public Keys DownKey { get; set; }
Property Value
Type | Description |
---|---|
Keys |
LeftKey
Declaration
public Keys LeftKey { get; set; }
Property Value
Type | Description |
---|---|
Keys |
RightKey
The key to move the object SadRogue.Primitives.Direction.Right by Amount.
Declaration
public Keys RightKey { get; set; }
Property Value
Type | Description |
---|---|
Keys |
UpKey
The key to move the object SadRogue.Primitives.Direction.Up by Amount.
Declaration
public Keys UpKey { get; set; }
Property Value
Type | Description |
---|---|
Keys |
Methods
ProcessKeyboard(IScreenObject, Keyboard, out bool)
Moves the host
by Amount when the appropriate key is pressed.
Declaration
public override void ProcessKeyboard(IScreenObject host, Keyboard keyboard, out bool handled)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | host | |
Keyboard | keyboard | |
bool | handled |