Object_CommonEvent Class
A common-event object handles a single common event defined in the database. Common events can run parallel to the actual scene content or can be just called from a scene to execute a common piece of logic.
Item Index
Methods
Properties
Methods
onDataBundleRestore.
(
-
Object
-
gs.ObjectCodecContext
Called if this object instance is restored from a data-bundle. It can be used re-assign event-handler, anonymous functions, etc.
Parameters:
-
Object
Objectdata - The data-bundle
-
gs.ObjectCodecContext
Objectcontext - The codec-context.
restore
(
-
bundle-
Restores the common-event from a data-bundle
Parameters:
-
bundle-
ObjectThe data-bundle.
toDataBundle
()
Object
Serializes the common-event into a data-bundle.
Returns:
Object:
The data-bundle.
Properties
behavior
gs.Component_CommonEventBehavior
The behavior component to add common-event specific behavior to the object.
events
gs.Component_EventEmitter
An event-emitter to emit events.
interpreter
gs.Component_CommandInterpreter
An interpreter to execute the commands of the common event.
record
Object
The common event database record.