API Docs for:
Show:

Component Class

Module: gs

The base class of all components. A component defines a certain piece of game logic.

Item Index

Methods

Properties

Methods

dispose

()

Disposes the component. The component will be removed from the game object automatically.

setup

()

Called when the component is added to a new object.

update

()

Updates the component. Needs to be implemented in derived class.

Properties

disposed

Boolean

Indicates if the component is disposed. A disposed component cannot be used anymore.

Default: false

id

String

An optional unique id. The component can be accessed through this ID using the gs.Object_Base.findComponentById method.

Default: null

isSetup

Boolean

Indicates if the component is setup.

Default: no

object

gs.Object_Base

The associated game object. A component only be part of one game object at the same time.

Default: null