void Help(ConsoleCommand command, string[] args) { Debug.LogFormat("Available Commands:"); foreach (var c in Commands) { if (c.Elevated) { Debug.LogFormat("\t*{0} {1}", c.Command, c.Help); } else { Debug.LogFormat("\t*{0} {1}", c.Command, c.Help); } } }
public void PrintError(ConsoleCommand consoleCommand) { Debug.LogErrorFormat("Incorrect number of arguments for {0}. Requires {1}", consoleCommand.Command, consoleCommand.Help); }
public void RegisterElevatedCommand(ConsoleCommand action) { action.MakeElevated(); Commands.Add(action); }
public void RegisterCommand(ConsoleCommand action) { Commands.Add(action); }
void Execute(ConsoleCommand consoleCommand, string[] args) { consoleCommand.Action(consoleCommand, args); }