Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GenericObjectPool

Manages multiple object pools

Hierarchy

Index

Constructors

constructor

  • Parameters

    • root: any

    Returns GenericObjectPool

Methods

clear

  • clear(): void
  • Clears all pools

    Returns void

deserialize

  • deserialize(data: any, registry: any): any
  • Deserializes the pools

    Parameters

    • data: any
    • registry: any

    Returns any

destroy

  • destroy(obj: any): void
  • Destroys an object

    Parameters

    • obj: any

    Returns void

draw

  • draw(parameters: any): void
  • Draws all pools

    Parameters

    • parameters: any

    Returns void

drawClass

  • drawClass(name: any, parameters: any): void
  • Draws the given object pools

    Parameters

    • name: any

      The class id to draw

    • parameters: any

    Returns void

finalizeBeforeSave

  • finalizeBeforeSave(): void
  • Finalizes all pools

    Returns void

getObjectCount

  • getObjectCount(): number
  • Returns the total number of objects

    Returns number

getPoolOrCreateNew

  • getPoolOrCreateNew(objectClass: any): any
  • Returns the right object pool for the given class

    Parameters

    • objectClass: any

    Returns any

serialize

  • serialize(): object
  • Serializes the pools

    Returns object

    • pools: any[]

spawnNew

  • spawnNew(objectClass: any, params: any): any
  • Spawns a new object with the given parameters

    Parameters

    • objectClass: any
    • params: any

    Returns any

update

  • update(): void
  • Updates all pools

    Returns void

Static getJsonSchema

  • getJsonSchema(): object
  • Returns the JSON schema used for validation

    Returns object

    • additionalProperties: boolean
    • properties: any
    • required: string[]
    • type: string