Skip to content
On this page

@thejsngin/jsngin / Exports / GameInstance

Interface: GameInstance

Running gameInstance

Table of contents

Properties

Properties

currentGameObject

Optional currentGameObject: GameObjectInstance

Defined in

src/game/interface.ts:21


currentLoadGameObject

Optional currentLoadGameObject: GameObjectInstance

Defined in

src/game/interface.ts:22


dispose

dispose: () => Promise<void>

Type declaration

▸ (): Promise<void>

Deallocate all the resources of the running game

Returns

Promise<void>

Defined in

src/game/interface.ts:17


env

env: Object

The environment data passed during GameInstance creation

Index signature

▪ [key: string]: any

Defined in

src/game/interface.ts:15


eventSystem

eventSystem: Object

All the game level events are fired on this event system

Type declaration

NameType
addEventListenerAddEventListner<EventSystemConfigType>
autoFireAutoFire<EventSystemConfigType>
fireEventFireEvent<EventSystemConfigType>
removeEventRemoveEvent<EventSystemConfigType>
removeEventListenerRemoveEventListner<EventSystemConfigType>

Defined in

src/game/interface.ts:13


setRoot

setRoot: (gameObject: GameObject, loadGameObject: GameObject) => Promise<void>

Type declaration

▸ (gameObject, loadGameObject): Promise<void>

Parameters
NameType
gameObjectGameObject
loadGameObjectGameObject
Returns

Promise<void>

Defined in

src/game/interface.ts:20


store

store: Object

Global store available at all levels within the GameObject tree

Index signature

▪ [key: string]: any

Defined in

src/game/interface.ts:19