A tile map transformed with an affine transformation.

See

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

Constructors

Properties

tag: string
workingPoint: FloatPoint = ...

A reusable Point to avoid allocations.

Methods

  • 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.

  • 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.

    See

    gdjs.RuntimeObject.getHitboxesAround

  • 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.