c3d.event

The event module is mainly used internally for sharing data across the engine. It is similiar to CCs event system.

clear()clears the event queue
poll()returns an iterator function to iterate everything in the event queue
push(...)adds an event to the queue
quit(status)triggers the quit event with the given status code
wait()returns event from the queue, if there isnt one it waits for one
add_listener(filter, f [, name [, debug]])Makes a new event listener with a custom filter
event_listenermethods for the event listener object
clear()Source

clears the event queue

poll()Source

returns an iterator function to iterate everything in the event queue

Returns

  1. function event queue iterator function
push(...)Source

adds an event to the queue

Parameters

  1. ... the event data
quit(status)Source

triggers the quit event with the given status code

Parameters

  1. status number the exist code to trigger the event with
wait()Source

returns event from the queue, if there isnt one it waits for one

Returns

  1. ... caught events data
add_listener(filter, f [, name [, debug]])Source

Makes a new event listener with a custom filter

Parameters

  1. filter the filter used for this event listener, may be a string or a table of event names.
  2. f function function triggered by the event_listener
  3. name? string allows you to select a custom name for the listener
  4. debug? boolean enables a bunch of logs that might be useful

Returns

  1. C3D.EVENT_LISTENER bunch of useful functions you can use to pause/kill/revive and manipulate this listener
event_listenerSource

methods for the event listener object

kill()kills the current event listener
pause()pauses the currently running event listener
resume()resumes the currently paused event listener
kill()Source

kills the current event listener

pause()Source

pauses the currently running event listener

resume()Source

resumes the currently paused event listener