Events

Functions

Boolean success <- attach (Integer script_id, String function, String event_class, Enumeration action, Enumeration value)
Attach an event to the named function; event_class should be one of the event classes, such as "engine", "collision", "keyboard", etc.

Example:
Events.attach(THIS, "handleEscape", "keyboard", Keyboard.PRESS, Keyboard.ESC)

Boolean success <- attach (Integer script_id, String function, String event_class, Enumeration action)
Attach an event to the named function; event_class should be one of the event classes, such as "engine", "collision", "keyboard", etc.

Example:
Events.attach(THIS, "handleKeyRelease", "keyboard", Keyboard.RELEASE)