Interface IInputCommand
Interface for input commands that can be executed by the input system. Commands encapsulate actions that can be triggered by input events.
Namespace: PopcorningGuineaPig.Engine.Input
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public interface IInputCommand
Properties
| Edit this page View SourceId
Unique identifier for this command.
Declaration
string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceCanExecute(object[])
Checks if the command can be executed with the given parameters.
Declaration
bool CanExecute(object[] parameters = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | parameters | Optional parameters for the command |
Returns
| Type | Description |
|---|---|
| bool | True if the command can be executed, false otherwise |
Execute(object[])
Executes the command synchronously.
Declaration
void Execute(object[] parameters = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | parameters | Optional parameters for the command |
ExecuteAsync(object[])
Executes the command asynchronously.
Declaration
Task ExecuteAsync(object[] parameters = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object[] | parameters | Optional parameters for the command |
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation |