GameObjectRegistry
Index
Variables
Functions
addGameObject
- internal
Parameters
gameObject: GameObject<any>
Returns void
callForType
Calls function of the GameObject of specified type with specified parameters.
Parameters
type: string
unique GameObject type to get all the instances of
what: string
function name as defined in GameObjectPrototype passed to GameObject.constructor
rest...params: any
parameters to be passed to the function
Returns any
callForTypeSafe
Same as GameObjectRegistry.callForType but for async operations.
Parameters
type: string
what: string
rest...params: any
Returns any
deployGameObject
- internal
Puts game object to an updatable queue, calling GameObjectPrototype.loaded. Should be called by GameObject.deploy.
Parameters
gameObject: GameObject<any>
Returns void
genUniqueName
- internal
Suffixes game object type if it already registered.
Parameters
name: string
Returns string
getAllByType
Gets an array of deployed objects of specified type.
Type parameters
Parameters
type: string
unique GameObject type to get all the instances of
clone: boolean
if
true
, a new array is created to be changeable, recommended by default
Returns GameObject<T>[]
registerClass
- internal
Registers game object to be saveable, called from GameObject.constructor.
Parameters
gameObject: GameObject<any>
Returns void
removeGameObject
- internal
Destroys game object, but without removing updatable as it is done via GameObject.destroy.
Parameters
gameObject: GameObject<any>
Returns void
resetEngine
- internal
Clears active game object list, maintaining updatable states.
Returns void
Puts game object as active, but without adding as updatable, which has been achieved by calling GameObject.deploy.