Options
All
  • Public
  • Public/Protected
  • All
Menu

A tile map transformed with an affine transformation.

see

getHitboxesAround It gives a fast access to hitboxes for collision handling.

Hierarchy

  • TransformedCollisionTileMap

Index

Constructors

Methods

  • getAllHitboxes(tag: string): Iterable<Polygon>
  • getDimensionX(): number
  • getDimensionY(): number
  • getHeight(): number
  • getHitboxes(tag: string, xMin: number, yMin: number, xMax: number, yMax: number): Iterable<Polygon>
  • Parameters

    • tag: string

      The tile tag.

    • xMin: number

      The fist column to include.

    • yMin: number

      The fist row to include.

    • xMax: number

      The last column to include.

    • yMax: number

      The last row to include.

    Returns Iterable<Polygon>

    All the hitboxes from the tiles overlapping the given area where tiles have the right tag.

  • getHitboxesAround(tag: string, left: number, top: number, right: number, bottom: number): Iterable<Polygon>
  • see

    {@link gdjs.RuntimeObject.getHitboxesAround}

    Parameters

    • tag: string

      The tile tag.

    • left: number

      The left border of the area in the scene.

    • top: number

      The top border of the area in the scene.

    • right: number

      The right border of the area in the scene.

    • bottom: number

      The left border of the area in the scene.

    Returns Iterable<Polygon>

    At least all the hitboxes from the given area where tiles have the right tag.

  • getTileDefinition(tileId: number): undefined | TileDefinition
  • getTileHeight(): number
  • getTileWidth(): number
  • getWidth(): number
  • pointIsInsideTile(x: number, y: number, tag: string): boolean
  • Check if a point is inside a tile with a given tag.

    It doesn't use the tile hitboxes. It only check the point is inside the tile square.

    Parameters

    • x: number

      The X coordinate of the point to check.

    • y: number

      The Y coordinate of the point to check.

    • tag: string

      The tile tag

    Returns boolean

    true when the point is inside a tile with a given tag.

Properties

tag: string
workingPoint: FloatPoint = ...

An reusable Point to avoid allocations.

Generated using TypeDoc