@thejsngin/jsngin / Exports / GameInstance
Interface: GameInstance
Running gameInstance
Table of contents
Properties
Properties
currentGameObject
• Optional
currentGameObject: GameObjectInstance
Defined in
currentLoadGameObject
• Optional
currentLoadGameObject: GameObjectInstance
Defined in
dispose
• dispose: () => Promise
<void
>
Type declaration
▸ (): Promise
<void
>
Deallocate all the resources of the running game
Returns
Promise
<void
>
Defined in
env
• env: Object
The environment data passed during GameInstance
creation
Index signature
▪ [key: string
]: any
Defined in
eventSystem
• eventSystem: Object
All the game level events are fired on this event system
Type declaration
Name | Type |
---|---|
addEventListener | AddEventListner <EventSystemConfigType > |
autoFire | AutoFire <EventSystemConfigType > |
fireEvent | FireEvent <EventSystemConfigType > |
removeEvent | RemoveEvent <EventSystemConfigType > |
removeEventListener | RemoveEventListner <EventSystemConfigType > |
Defined in
setRoot
• setRoot: (gameObject
: GameObject
, loadGameObject
: GameObject
) => Promise
<void
>
Type declaration
▸ (gameObject
, loadGameObject
): Promise
<void
>
Parameters
Name | Type |
---|---|
gameObject | GameObject |
loadGameObject | GameObject |
Returns
Promise
<void
>
Defined in
store
• store: Object
Global store available at all levels within the GameObject
tree
Index signature
▪ [key: string
]: any