//Logic of the command public override void RunCommand(string[] args) { if (DeveloperConsoleUtils.noValidArguments(args)) { DeveloperConsole.Instance.AddMessageToConsole(DeveloperConsoleMessages.MissingCommandArgumentsMessage); return; } if (DeveloperConsole.isValidCommand(args[0])) { DeveloperConsole.Instance.AddMessageToConsole(DeveloperConsole.Commands[args[0]].Description); } else { DeveloperConsole.Instance.AddMessageToConsole(DeveloperConsoleMessages.UnrecognizedCommandMessage); } }
//Logic of the command public override void RunCommand(string[] args) { if(DeveloperConsoleUtils.noValidArguments(args)) { DeveloperConsole.Instance.AddMessageToConsole("Avilable commands:"); foreach (ConsoleCommand command in DeveloperConsole.Commands.Values) { DeveloperConsole.Instance.AddMessageToConsole("- " + command.Name); } return; } if(DeveloperConsole.isValidCommand(args[0])){ DeveloperConsole.Instance.AddMessageToConsole(DeveloperConsole.Commands[args[0]].Help); } else { DeveloperConsole.Instance.AddMessageToConsole(DeveloperConsoleMessages.UnrecognizedCommandMessage); } }