TileCollider class

Utility for generating collision shapes from Tiled data.

Constructors

TileCollider()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromObject(TiledObjectData obj) → List<CollisionShape>
Converts a Tiled object to collision shapes in LOCAL space.
fromTileCollision(LoadedTileset tileset, int localId, double worldX, double worldY) → List<CollisionShape>
Generates collision shapes from tile collision data.
fromTileLayer({required Iterable<TileCollisionData> tiles, required double tileWidth, required double tileHeight}) → List<CollisionShape>
Generates collision shapes for all tiles with collision in a layer.
mergeRectangles(List<RectangleShape> rectangles, {double tolerance = 0.001}) → List<RectangleShape>
Merges adjacent rectangle shapes into larger rectangles.