Crafty.bind()

public Function bind(String eventName, Function callback)
eventName

绑定事件的名称

callback

事件触发时要执行的方法

[Returns]

回调函数,可以用于解绑

绑定全局事件。当使用事件名称执行 Crafty.trigger 时,回调函数会被运行。