GameObjRaw:
Base interface of all game objects.add<T>(comps?: CompList | GameObj): GameObj<Bug parsing ConditionalType>
Add a child.since
v3000.0
readd<T>(obj: GameObj): GameObj<T>
Remove and re-add the game obj, without triggering add / destroy events.remove(obj: GameObj): void
Remove a child.since
v3000.0
removeAll(tag: Tag): void
Remove all children with a certain tag.since
v3000.0
removeAll(): void
Remove all children.since
v3000.0
get(tag: Tag | Tag[], opts?: GetOpt): GameObj[]
Get a list of all game objs with certain tag.since
v3000.0
query(opt: QueryOpt): GameObj[]
Get a list of all game objs with certain properties.since
v3001.0
children: GameObj[]
Get all children game objects.since
v3000.0
tags: string[]
Get the tags of a game object.since
v3001.0
fixedUpdate(): void
Update this game object and all children game objects.since
v3001.0
update(): void
Update this game object and all children game objects.since
v3000.0
draw(): void
Draw this game object and all children game objects.since
v3000.0
drawInspect(): void
Draw debug info in inspect modesince
v3000.0
clearEvents(): void
is(tag: Tag | Tag[]): boolean
If there's certain tag(s) on the game obj.use(comp: Comp | Tag): void
Add a component or tag.unuse(comp: Tag): void
Remove a tag or a component with its id.on(event: string, action: (args: any)=>void): KEventController
Register an event.trigger(event: string, args: any): void
Trigger an event.destroy(): void
Remove the game obj from scene.c(id: Tag): Comp | null
Get state for a specific comp.inspect(): GameObjInspect
Gather debug info of all comps.onAdd(action: ()=>void): KEventController
Register an event that runs when the game obj is added to the scene.onUpdate(action: ()=>void): KEventController
Register an event that runs every frame as long as the game obj exists.since
v2000.1
onDraw(action: ()=>void): KEventController
Register an event that runs every frame as long as the game obj exists (this is the same as `onUpdate()`, but all draw events are run after all update events).since
v2000.1
onDestroy(action: ()=>void): KEventController
Register an event that runs when the game obj is destroyed.since
v2000.1
exists(): boolean
If game obj is attached to the scene graph.isAncestorOf(obj: GameObj): boolean
Check if is an ancestor (recursive parent) of another game objectsince
v3000.0
transform: Mat4
Calculated transform matrix of a game object.since
v3000.0
paused: boolean
If update the game obj (run "update" event or not).id: GameObjID | null
A unique number ID for each game object.canvas: FrameBuffer | null
The canvas to draw this game object onsince
v3001.0