API Docs for:
Show:

Component_CommonEventBehavior Class

Module: gs

A component which allows a game object to execute common-events.

Methods

call

(
  • parameters
)

Calls the common-event with the specified parameters.

Parameters:

  • parameters Object

    The common-event's parameters which can be configured in database.

erase

()

Not implemented yet.

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 Object

    data - The data-bundle

  • gs.ObjectCodecContext Object

    context - The codec-context.

restore

(
  • bundle-
)

Restores the component from a data-bundle

Parameters:

  • bundle- Object

    The data-bundle.

resume

()

Resumes a paused common-event interpreter.

setup

()

Initializes the common-event.

setupEventHandlers

()

Adds event-handlers for mouse/touch events

setupParameters

()

Initializes variable-store with the start-up parameters configured for the common-event in Database.

start

(
  • parameters
)

Starts the common-event interpreter with the specified parameters.

Parameters:

  • parameters Object

    The common-event's parameters which can be configured in database.

stop

()

Stops the common-event interpreter.

toDataBundle

() Object

Serializes the component into a data-bundle.

Returns:

Object:

The data-bundle.

update

()

Updates the common-event interpreter.

Properties

initialized

Boolean private

readyToStart

Boolean private