C# Class CryEngine.CVar

ファイルを表示 Open project: PoppermostProductions/CryMono Class Usage Examples

Public Methods

Method Description
Get ( string name ) : CVar

Retrieve a console variable by name - not case sensitive

Register ( string name, float value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar

Registers a new console variable with the specified default value.

Register ( string name, int value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar

Registers a new console variable with the specified default value.

Register ( string name, string value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar

Registers a new console variable with the specified default value.

RegisterFloat ( string name, float &value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar

Registers a new console variable that will update the user defined float.

RegisterInt ( string name, int &value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar

Registers a new console variable that will update the user defined integer.

TryGet ( string name, CVar &cvar ) : bool

Firstly checks whether a specified CVar is valid, then if so, modifies the cvar reference

Unregister ( string name, bool delete = false ) : void

Unregisters an existing console variable

Private Methods

Method Description
Register ( CryEngine.CVarAttribute attribute, MemberInfo memberInfo, float &value ) : CVar
Register ( CryEngine.CVarAttribute attribute, MemberInfo memberInfo, int &value ) : CVar
Register ( CryEngine.CVarAttribute attribute, MemberInfo memberInfo, string value ) : CVar
RegisterInternal ( string name, object value, string help, CVarFlags flags ) : CVar

Method Details

Get() public static method

Retrieve a console variable by name - not case sensitive
public static Get ( string name ) : CVar
name string The name of the CVar to retrieve
return CVar

Register() public static method

Registers a new console variable with the specified default value.
public static Register ( string name, float value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar
name string console variable name
value float default value of the console variable
help string help text that is shown when you use ? in the console
flags CVarFlags
return CVar

Register() public static method

Registers a new console variable with the specified default value.
public static Register ( string name, int value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar
name string console variable name
value int default value of the console variable
help string help text that is shown when you use ? in the console
flags CVarFlags
return CVar

Register() public static method

Registers a new console variable with the specified default value.
public static Register ( string name, string value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar
name string console variable name
value string default value of the console variable
help string help text that is shown when you use ? in the console
flags CVarFlags
return CVar

RegisterFloat() public static method

Registers a new console variable that will update the user defined float.
public static RegisterFloat ( string name, float &value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar
name string console variable name
value float reference to the memory that will be updated
help string help text that is shown when you use ? in the console
flags CVarFlags
return CVar

RegisterInt() public static method

Registers a new console variable that will update the user defined integer.
public static RegisterInt ( string name, int &value, string help = "", CVarFlags flags = CVarFlags.None ) : CVar
name string console variable name
value int reference to the memory that will be updated
help string help text that is shown when you use ? in the console
flags CVarFlags
return CVar

TryGet() public static method

Firstly checks whether a specified CVar is valid, then if so, modifies the cvar reference
public static TryGet ( string name, CVar &cvar ) : bool
name string The name of the CVar to retrieve
cvar CVar The CVar object to modify (usually blank)
return bool

Unregister() public static method

Unregisters an existing console variable
public static Unregister ( string name, bool delete = false ) : void
name string
delete bool
return void