Пример #1
0
 public void AddConsoleCommand(ConsoleConmand command)
 {
     if (_commandDic.ContainsKey(command.Id))
     {
         throw new Exception("Has exist command: " + command.Id);
     }
     else
     {
         _commandDic.Add(command.Id, command);
     }
 }
Пример #2
0
        public void AddConsoleCommand(ConsoleConmand command, bool isPreset = false)
        {
            if (command.Id.IndexOf(" ") != -1)
            {
                //Debug.LogError(string.Format("The command id '{0}' you defined in console should not contains space", command.Id));
                return;
            }

            GetCommondInput().AddConsoleCommand(command);

            if (isPreset)
            {
                AddPresetCommandStr(command.Id);
            }
        }