idTech4.idCmdSystem.Init C# (CSharp) Method

Init() public method

public Init ( ) : void
return void
		public void Init()
		{
			if(this.IsInitialized == true)
			{
				throw new InvalidOperationException("Command system has already been initialized.");
			}

			AddCommand("listCmds", "lists commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListAllCommands));
			AddCommand("listSystemCmds", "lists system commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListSystemCommands));
			AddCommand("listRendererCmds", "lists renderer commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListRendererCommands));
			AddCommand("listSoundCmds", "lists sound commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListSoundCommands));
			AddCommand("listGameCmds", "lists game commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListGameCommands));
			AddCommand("listToolCmds", "lists tool commands", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_ListToolCommands));
			AddCommand("exec", "executes a config file", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_Exec)/* TODO: , new EventHandler<CommandCompletionEventArgs>(ArgCompletion_ConfigName)*/);
			AddCommand("vstr", "inserts the current value of a cvar as command text", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_VStr));
			AddCommand("echo", "prints text", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_Echo));
			AddCommand("parse", "prints tokenized string", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_Parse));
			AddCommand("wait", "delays remaining buffered commands one or more frames", CommandFlags.System, new EventHandler<CommandEventArgs>(Cmd_Wait));

			_initialized = true;
		}