tilemap.ObjectGroup
pykraken.tilemap.ObjectGroup ObjectGroup is a layer containing placed MapObjects.
More about tilemap.ObjectGroup
Attributes
- color (
Color) — Tint color applied to non-tile objects. - opacity (
float) — Layer opacity. - draw_order (
DrawOrder) — Drawing order for objects. - objects (
MapObjectList) — List of contained MapObject instances.
Methods
- draw — Draw the object group.
Inherits Layer
At a glance
10 membersReference
PYTHON APIConstructor
methodtilemap.ObjectGroup(/, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.
color
propertycolor: ColorTint color for non-tile objects.
draw_order
propertydraw_order: tilemap.ObjectGroup.DrawOrderDrawing order for objects in the group.
name
propertyname: strLayer name.
objects
propertyobjects: tilemap.MapObjectListMapObjectList of objects in the group.
offset
propertyoffset: Vec2Per-layer drawing offset.
opacity
propertyopacity: floatLayer opacity from 0.0 to 1.0.
type
propertytype: tilemap.LayerTypeLayer type enum.
visible
propertyvisible: boolWhether the layer is visible.
draw
methodDraw the object group.
Args
- angle (
float, optional) — Rotation angle in degrees. Defaults to 0.0. - pivot (
Vec2, optional) — Rotation pivot as normalized coordinates relative to the map size. Defaults to (0.5, 0.5).