Options
All
  • Public
  • Public/Protected
  • All
Menu

The instance container of a custom object, containing instances of objects rendered on screen.

see

gdjs.CustomRuntimeObject

Hierarchy

Index

Methods

  • addLayer(layerData: LayerData): void
  • convertCoords(x: number, y: number, result: FloatPoint): FloatPoint
  • convertInverseCoords(sceneX: number, sceneY: number, result: FloatPoint): FloatPoint
  • createObjectsFrom(data: InstanceData[], xPos: number, yPos: number, trackByPersistentUuid: boolean): void
  • Create objects from initial instances data (for example, the initial instances of the scene or the instances of an external layout).

    Parameters

    • data: InstanceData[]

      The instances data

    • xPos: number

      The offset on X axis

    • yPos: number

      The offset on Y axis

    • trackByPersistentUuid: boolean

      If true, objects are tracked by setting their persistentUuid to the same as the associated instance. Useful for hot-reloading when instances are changed.

    Returns void

  • enableDebugDraw(enableDebugDraw: boolean, showHiddenInstances: boolean, showPointsNames: boolean, showCustomPoints: boolean): void
  • getAllLayerNames(result: string[]): void
  • getElapsedTime(): number
  • getInitialSharedDataForBehavior(name: string): null | BehaviorSharedData
  • getInstancesCountOnScene(objectName: string): number
  • getLayer(name: string): Layer
  • getViewportHeight(): number
  • getViewportOriginX(): number
  • getViewportOriginY(): number
  • getViewportWidth(): number
  • hasLayer(name: string): boolean
  • isObjectRegistered(objectName: string): boolean
  • onChildrenLocationChanged(): void
  • onObjectUnscaledCenterChanged(oldOriginX: number, oldOriginY: number): void
  • registerObject(objectData: ObjectData): void
  • removeLayer(layerName: string): void
  • setInitialSharedDataForBehavior(name: string, sharedData: null | BehaviorSharedData): void
  • setLayerIndex(layerName: string, index: number): void
  • unregisterObject(objectName: string): void
  • Called when the container must be updated using the specified objectData. This is the case during hot-reload, and is only called if the object was modified.

    Parameters

    • oldCustomObjectData: ObjectData & ObjectConfiguration & { childrenContent: {} }

      The previous data for the object.

    • newCustomObjectData: ObjectData & ObjectConfiguration & { childrenContent: {} }

      The new data for the object.

    Returns boolean

    true if the object was updated, false if it could not (i.e: hot-reload is not supported).

  • updateObject(objectData: ObjectData): void
  • updateObjectsForces(): void

Constructors

Properties

pathfindingObstaclesManager: PathfindingObstaclesManager
tileMapCollisionMaskManager: TileMapRuntimeManager

Generated using TypeDoc