Class GameObject
Manages all components and transform
in the world. Can be overridden.
Inherits from
-
(base class)Object
Constructors
Name | Description |
---|---|
this
|
Creates basic GameObject with transform and connection to transform 's emitter.
|
this
|
Allows you to create an object with a set list of components you already have. |
Fields
Name | Type | Description |
---|---|---|
id
|
immutable(uint) |
The ID of the object. |
Properties
Name | Type | Description |
---|---|---|
animation
[get]
|
Animation |
|
animation
[set]
|
Animation |
|
camera
[get]
|
Camera |
|
camera
[set]
|
Camera |
|
children
[get]
|
GameObject[] |
|
light
[get, set]
|
Light |
The light attached to this object.
|
material
[get]
|
Material |
|
material
[set]
|
Material |
|
mesh
[get]
|
Mesh |
|
mesh
[set]
|
Mesh |
|
name
[get]
|
string |
|
name
[set]
|
string |
|
parent
[get]
|
GameObject |
|
stateFlags
[get]
|
ObjectStateFlags* |
|
stateFlags
[set]
|
ObjectStateFlags* |
|
transform
[get]
|
dash. |
|
yaml
[get]
|
dyaml. |
|
children
[set]
|
GameObject[] |
|
parent
[set]
|
GameObject |
Methods
Name | Description |
---|---|
addChild
|
Adds object to the children , adds it to the scene graph.
|
addComponent
|
Adds a component to the object. |
createFromYaml
|
Allow setting of state flags directly. |
draw
|
Called once per frame to draw all children .
|
getComponent
|
Gets a component of the given type. |
refresh
|
Refreshes the object with the given YAML node .
|
removeChild
|
Removes the given object as a child from this object. |
shutdown
|
Called when the game is shutting down, to shutdown all children .
|
update
|
Called once per frame to update all children and components.
|