Перейти к основному содержанию

GameObjectRegistry

Index

Variables

Functions

addGameObject

  • internal

    Puts game object as active, but without adding as updatable, which has been achieved by calling GameObject.deploy.


    Parameters

    Returns void

callForType

  • callForType(type: string, what: string, ...params: any): any
  • Calls function of the GameObject of specified type with specified parameters.


    Parameters

    Returns any

callForTypeSafe

  • callForTypeSafe(type: string, what: string, ...params: any): any

deployGameObject

  • deployGameObject(gameObject: GameObject<any>): void

genUniqueName

  • genUniqueName(name: string): string
  • internal

    Suffixes game object type if it already registered.


    Parameters

    • name: string

    Returns string

getAllByType

  • getAllByType<T>(type: string, clone: boolean): GameObject<T>[]
  • 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

removeGameObject

  • removeGameObject(gameObject: GameObject<any>): void
  • internal

    Destroys game object, but without removing updatable as it is done via GameObject.destroy.


    Parameters

    Returns void

resetEngine

  • resetEngine(): void
  • internal

    Clears active game object list, maintaining updatable states.


    Returns void