LdtkIntGrid class
Represents an IntGrid layer from LDtk.
Constructors
Properties
- cellSize → int
-
The size of each grid cell in pixels.
final
-
grid
→ List<
List< int> > -
The grid data as a 2D array
x.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ int
-
Cached height of the grid in cells.
latefinal
- layerName → String
-
The name of the IntGrid layer.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
valueColors
→ Map<
int, Color> -
Mapping of IntGrid values to their colors.
final
- width ↔ int
-
Cached width of the grid in cells.
latefinal
Methods
-
getValue(
int x, int y) → int - Gets the grid value at the specified cell coordinates. Returns 0 if out of bounds.
-
isSolid(
int x, int y) → bool - Checks if a cell position has a non-zero value (typically solid).
-
isSolidAtPixel(
double pixelX, double pixelY) → bool - Checks if a pixel position collides with a solid cell.
-
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