C# Class CryEngine.ConsoleCommand

Exibir arquivo Open project: PoppermostProductions/CryMono

Public Methods

Method Description
Execute ( string command, bool silent = false ) : void

Executes a string in the console

Register ( string name, ConsoleCommandDelegate func, string comment = "", CVarFlags flags = CVarFlags.None, bool overwrite = false ) : void

Register a new console command.

Unregister ( string name ) : void

Private Methods

Method Description
OnCommand ( string fullCommandLine ) : void

Method Details

Execute() public static method

Executes a string in the console
public static Execute ( string command, bool silent = false ) : void
command string console command e.g. "map testy" - no leading slash
silent bool suppresses log in error case and logging the command to the console
return void

Register() public static method

Register a new console command.
public static Register ( string name, ConsoleCommandDelegate func, string comment = "", CVarFlags flags = CVarFlags.None, bool overwrite = false ) : void
name string Command name.
func ConsoleCommandDelegate Delegate to the console command function to be called when command is invoked.
comment string Help string, will be displayed when typing in console "command ?".
flags CVarFlags Bitfield consist of VF_ flags (e.g. VF_CHEAT)
overwrite bool
return void

Unregister() public static method

public static Unregister ( string name ) : void
name string
return void