craftyjs.github.com

Crafty.settings

Modify the inner workings of Crafty through the settings.

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

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.

See Also

Back to top

Crafty.settings.get

public * Crafty.settings.get(String settingName)

settingName
Name of the setting

Returns the current value of the setting.

See Also