PixelTile class
Describes one named tile of a PixelTileset: either a single static PixelArt, or a list of frames to be played back as an animation.
Constructors
-
PixelTile.animated(List<
PixelArt> frames, {required double stepTime, bool collision = false, String? tileClass, Map<String, dynamic> ? properties}) -
An animated tile, cycling through
frameseverystepTimeseconds. -
PixelTile.single(PixelArt art, {bool collision = false, String? tileClass, Map<
String, dynamic> ? properties}) - A static tile, drawn from a single PixelArt.
Properties
- collision → bool
-
When
true, PixelTileset.tile adds a full-tile RectangleHitbox to the generated Tile by default (can still be overridden per call).final -
frames
→ List<
PixelArt> -
The frames that make up this tile. A static tile has a single frame.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnimated → bool
-
no setter
-
properties
→ Map<
String, dynamic> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepTime → double
-
Time (in seconds) each frame is shown, only used when isAnimated.
final
- tileClass → String?
-
final
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