Tile class

A tile for a TileMap.

Annotations
  • @JsonSerializable()

Constructors

Tile({required int x, required int y, required int value})
Create an instance.
const
Tile.fromJson(Map<String, dynamic> json)
Create an instance from a JSON object.
factory
Tile.fromPoint({required Point<int> point, required int value})
Create an instance from the given point.

Properties

coordinates Point<num>
Get the coordinates of this tile.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The value of this tile.
final
x int
The x coordinate of this tile.
final
y int
The y coordinate of this tile.
final

Methods

hasFlag(int flag) bool
Returns true if value has the given flag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert an instance to JSON.
toString() String
A string representation of this object.
inherited

Operators

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