public ConsoleCommand(string name, MethodDelegate method, string description, int tag, AutocompleteDelegate autocompleteMethod) { this.name = name; this.method = method; this.description = description; this.tag = tag; this.autocompleteMethod = autocompleteMethod; }
public static void AddCommand(string name, MethodDelegate method, string description, AutocompleteDelegate autocompleteMethod = null, int tag = 0) { if (s_Commands.ContainsKey(name.ToLower())) { RemoveCommand(name.ToLower()); //OutputString("Cannot add command " + name + " twice"); //return; } s_Commands.Add(name.ToLower(), new ConsoleCommand(name, method, description, tag, autocompleteMethod)); }