WangColorData class
One terrain: grass, water, a road.
Constructors
- WangColorData({String name = '', int color = 0xFFFF0000, int tile = -1, double probability = 1, String className = '', TileProperties? properties})
-
A terrain called
name, shown incolor(opaque red unless said), with no tile standing for it and probability 1.
Properties
- className ↔ String
-
A free-form class, as in Tiled.
getter/setter pair
- color ↔ int
-
ARGB, how the editor shows it.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- name ↔ String
-
What the editor shows it as:
grass,water.getter/setter pair - probability ↔ double
-
How often the brush picks tiles of it, relative to the others.
getter/setter pair
- properties ↔ TileProperties
-
Custom properties, as in Tiled.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tile ↔ int
-
A tile that stands for it, or -1.
getter/setter pair
Methods
-
copy(
) → WangColorData - A separate copy, properties included.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
The saved form: a JSON map with
nameandcolor, andtile,probability,classandpropertieswhen not their defaults. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< String, dynamic> json) → WangColorData - Reads what toJson wrote; missing keys take their defaults.