API Docs for:
Show:

Object_CommonEvent Class

Module: gs

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.

Methods

onDataBundleRestore.

(
  • Object
  • gs.ObjectCodecContext
)

Provided by the vn module.

Called if this object instance is restored from a data-bundle. It can be used re-assign event-handler, anonymous functions, etc.

Parameters:

  • Object Object

    data - The data-bundle

  • gs.ObjectCodecContext Object

    context - The codec-context.

restore

(
  • bundle-
)

Restores the common-event from a data-bundle

Parameters:

  • bundle- Object

    The 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.