using System.Collections.Generic;
namespace Cyber.Console {
///
/// Class that defines an action that commands in the
/// might use.
///
public class DebugConsoleAction {
///
/// A delegate for all of the actions that commands do.
///
public delegate void Action(List command);
///
/// A description that will be shown when using the "help (command)" command in the console.
///
public readonly string Description;
private Action ActionFunc;
///
/// Initializes a new instance of the class.
///
/// Description.
/// Action func.
public DebugConsoleAction(string description, Action actionFunc) {
this.Description = description;
this.ActionFunc = actionFunc;
}
///
/// Executes the .
///
/// Command.
public void Call(List command) {
ActionFunc(command);
}
}
}