Skip to content

GameObject

Isuru Kusumal Rajapakse edited this page Jun 17, 2017 · 1 revision

new GameObject()

Returns
  • Void

GameObject.constructor(id[, x=0, y=0, w=0, h=0])

Create an GameObject.

Parameters
Name Type Description
id string - name of the GameObject.  
x=0 number - x position. Optional
y=0 number - y position. Optional
w=0 int - desired width. Optional
h=0 int - desired height. Optional
Returns
  • Void

GameObject.clone()

clones the object

Returns
  • GameObject cloned game object

GameObject.attach(component)

attaches a particular behavior component to the game object

Parameters
Name Type Description
component Component - component to attach  
Returns
  • GameObject itself

Documentation generated with doxdox.

Clone this wiki locally