idTech4.idCvarSystem.Command C# (CSharp) 메소드

Command() 공개 메소드

Called by the command system when a command is unrecognized.
public Command ( idCmdArgs args ) : bool
args idCmdArgs
리턴 bool
		public bool Command(idCmdArgs args)
		{
			idInternalCvar intern = FindInternal(args.Get(0));

			if(intern == null)
			{
				return false;
			}

			if(args.Length == 1)
			{
				// print the variable
				idConsole.WriteLine("\"{0}\" is: \"{1}\" {2} default: \"{3}\"", intern.Name, intern.ToString(), idColorString.White, intern.ResetString);

				if(intern.Description.Length > 0)
				{
					idConsole.WriteLine("{0}{1}", idColorString.White, intern.Description);
				}
			}
			else
			{
				// set the value
				intern.Set(args.ToString(), false, false);
			}

			return true;
		}