Main handler for controlling CVar behavior.
Static methods
staticgetCvar(_name:String):Dynamic
Gets value of CVar. Type of value returned depends on type of CVar set.
Parameters:
_name | Name of CVar needed |
---|
Returns:
Int, Float, String, or Bool
staticinlinereplaceCvar(_name:String, _type:CVarType, _value:Any, ?_onSet:() ‑> Void, _callAfterSet:Bool = false):Void
To call to replace an existing CVar
Parameters:
_name | Namespace of CVar |
---|---|
_type | What type of data will it be storing, dictates reading and writing behavior |
_value | Value to set this CVar to |
_onSet | Function to call when changing the value |
_callAfterSet | Call this function immedaitely after creating this CVar |
staticsetCVar(_name:String, _value:Any, _doNotCallFunction:Bool = false):Void
Change the value of an existing CVar
Parameters:
_name | Name of CVar to set |
---|---|
_value | Value to set CVar to |
_doNotCallFunction | When set to true, the CVar's attached funtion will not be called |
staticinlinesetNewCVar(_name:String, _type:CVarType, _value:Any, ?_onSet:() ‑> Void, _callAfterSet:Bool = false):Void
Call to set a new CVar. Will not allow replacement of existing CVars.
Parameters:
_name | Namespace of CVar |
---|---|
_type | What type of data will it be storing, dictates reading and writing behavior |
_value | Value to set this CVar to |
_onSet | Function to call when changing the value |
_callAfterSet | Call this function immedaitely after creating this CVar |