Table of Contents

Interface IInputCommand

Namespace
PopcorningGuineaPig.Engine.Input
Assembly
PopcorningGuineaPig.Engine.dll

Interface for input commands that can be executed by the input system. Commands encapsulate actions that can be triggered by input events.

public interface IInputCommand

Properties

Id

Unique identifier for this command.

string Id { get; }

Property Value

string

Methods

CanExecute(object[])

Checks if the command can be executed with the given parameters.

bool CanExecute(object[] parameters = null)

Parameters

parameters object[]

Optional parameters for the command

Returns

bool

True if the command can be executed, false otherwise

Execute(object[])

Executes the command synchronously.

void Execute(object[] parameters = null)

Parameters

parameters object[]

Optional parameters for the command

ExecuteAsync(object[])

Executes the command asynchronously.

Task ExecuteAsync(object[] parameters = null)

Parameters

parameters object[]

Optional parameters for the command

Returns

Task

A task representing the asynchronous operation