Crafty.settings

Modify the inner workings of Crafty through the settings.

Methods

Back to top

Crafty.settings.get()

public * Crafty.settings.get(String settingName)
settingName

Name of the setting

[Returns]

Current value of the setting

Returns the current value of the setting.

Back to top

Crafty.settings.modify()

public void Crafty.settings.modify(String settingName, * value)
settingName

Name of the setting

value

Value to set the setting to

Modify settings through this method.

Back to top

Crafty.settings.register()

public void Crafty.settings.register(String settingName, Function callback)
settingName

Name of the setting

callback

Function to execute when use modifies setting

Use this to register custom settings. Callback will be executed when Crafty.settings.modify is used.

See Also