GiantToadTileCollision class
Collision queries against one sparse solid tile layer.
Constructors
-
GiantToadTileCollision({required GiantToadMapDocument document, String solidLayer = 'solids', bool isSolid(GiantToadMapCell? cell)?, GiantToadTileMaterial materialFor(GiantToadMapCell? cell)?, Iterable<
GiantToadMapLayer> additionalLayers = const []})
Properties
-
additionalLayers
→ List<
GiantToadMapLayer> -
final
- document → GiantToadMapDocument
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- layer → GiantToadMapLayer
-
final
- materialFor → GiantToadTileMaterial Function(GiantToadMapCell? cell)
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cell(
int x, int y) → GiantToadMapCell? -
materialAt(
int x, int y) → GiantToadTileMaterial -
mergedSolidRects(
{required int minX, required int minY, required int maxX, required int maxY}) → List< Rect> - Merges solid tile occupancy into deterministic maximal rectangles. Useful for Flame hitboxes and for comparing sparse-grid queries against a lower-body-count collision representation.
-
moveAndSlide(
Rect body, Vector2 delta) → GiantToadTileMoveResult -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlaps(
Rect bounds) → bool -
solidAt(
int x, int y) → bool -
toString(
) → String -
A string representation of this object.
inherited
-
triggerCells(
Rect bounds) → Set< Point< int> > -
Trigger cells touched by
bounds, suitable for enter/exit state tracking.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited