Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TruckManager

Hierarchy

Index

Constructors

constructor

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

getObjectCount

  • getObjectCount(): number

getPoolOrCreateNew

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

    Parameters

    • objectClass: any

    Returns any

resetAndApplyGameDump

  • resetAndApplyGameDump(dump: any): void
  • Parameters

    • dump: any

    Returns void

serialize

  • serialize(): object
  • Serializes the pools

    Returns object

    • pools: any[]

serializePendingTrucks

  • serializePendingTrucks(): any[]
  • Serializes all pending trucks so we can replay it on other clients in case of a resync (Multiplayer only)

    Returns 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