Skip to content
premasagar edited this page Sep 24, 2011 · 5 revisions

these are the events you can listen for via bind or emit via trigger

jj object events (eg, jj.bind('tick', callback) )

Callback is passed two arguments:

callback(deltaT, now);
// deltaT is the number of milliseconds since the previous frame; now is the current timestamp in milliseconds

clock(hour, minute)

creature events (eg, creature.bind('touch', callback) and/or creature.trigger('touch' creature) )

touch(creature)
see(creature)
hear(creature)
smell(creature)
eat(creature)

Clone this wiki locally