ObjectGroup class

Inheritance

Constructors

ObjectGroup({int? id, required String name, String? class_, int x = 0, int y = 0, double offsetX = 0, double offsetY = 0, double parallaxX = 1, double parallaxY = 1, int? startX, int? startY, String? tintColorHex, Color? tintColor, double opacity = 1, bool visible = true, CustomProperties properties = CustomProperties.empty, DrawOrder drawOrder = DrawOrder.topDown, required List<TiledObject> objects, String colorHex = defaultColorHex, Color color = defaultColor})

Properties

class_ String?
The "Class" specified in Tiled, introduced in Tiled 1.9 to support custom types on any object. This is NOT the same as type
getter/setter pairinherited
color Color
Color used to display the objects in this group. (defaults to gray (“#a0a0a4”))
getter/setter pair
colorHex String
Hex-formatted color (#RRGGBB or #AARRGGBB) used to display the objects in this group. (defaults to gray (“#a0a0a4”))
getter/setter pair
drawOrder DrawOrder
topdown (default) or index (indexOrder).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int?
Incremental ID - unique across all layers
getter/setter pairinherited
name String
Name assigned to this layer. Always present; might be an empty string.
getter/setter pairinherited
objects List<TiledObject>
List of TiledObject.
getter/setter pair
offsetX double
Horizontal layer offset in pixels (default: 0)
getter/setter pairinherited
offsetY double
Vertical layer offset in pixels (default: 0)
getter/setter pairinherited
opacity double
The opacity of the layer as a value from 0 to 1. Defaults to 1.
getter/setter pairinherited
parallaxX double
Horizontal parallax factor for this layer (default: 1). (since Tiled 1.5) See: https://doc.mapeditor.org/en/stable/manual/layers/#parallax-factor
getter/setter pairinherited
parallaxY double
Vertical parallax factor for this layer (default: 1). (since Tiled 1.5) See: https://doc.mapeditor.org/en/stable/manual/layers/#parallax-factor
getter/setter pairinherited
properties CustomProperties
List of Property.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startX int?
X coordinate where layer content starts (for infinite maps)
getter/setter pairinherited
startY int?
Y coordinate where layer content starts (for infinite maps)
getter/setter pairinherited
tintColor Color?
Color that is multiplied with any graphics drawn by this layer or any child layers (optional).
getter/setter pairinherited
tintColorHex String?
Hex-formatted tint color (#RRGGBB or #AARRGGBB) that is multiplied with any graphics drawn by this layer or any child layers (optional).
getter/setter pairinherited
type LayerType
Each type is associated with a concrete implementation of Layer.
getter/setter pairinherited
visible bool
Whether layer is shown or hidden in editor.
getter/setter pairinherited
x int
Horizontal layer offset in tiles. Always 0.
getter/setter pairinherited
y int
Vertical layer offset in tiles. Always 0.
getter/setter pairinherited

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

Constants

defaultColor → const Color
defaultColorHex → const String