clik-engine API
    Preparing search index...

    Class TilemapManager

    Index

    Constructors

    Methods

    • Replace a tile at a grid position

      Parameters

      • layerName: string
      • tileX: number
      • tileY: number
      • newIndex: number

      Returns void

    • Set collision on a layer by tile property or index range.

      Parameters

      • layerName: string
      • Optionaloptions: { all?: boolean; indices?: number[]; property?: string }
        • Optionalall?: boolean

          Collide on all non-empty tiles

        • Optionalindices?: number[]

          Collide on specific tile indices

        • Optionalproperty?: string

          Collide on tiles with this property set to true in Tiled

      Returns void

    • Set parallax scroll factor on a layer for depth effect. Values < 1 scroll slower (background), > 1 scroll faster (foreground).

      Parameters

      • layerName: string
      • scrollFactorX: number
      • OptionalscrollFactorY: number

      Returns void

    • Check if a tile at a position has a specific property

      Parameters

      • layerName: string
      • worldX: number
      • worldY: number
      • property: string

      Returns boolean