CLASS v1.8.0

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

Reference

PYTHON API
tilemap.ObjectGroup(/, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

color

property
color: Color

Tint color for non-tile objects.

draw_order

property

Drawing order for objects in the group.

name

property
name: str

Layer name.

objects

property

MapObjectList of objects in the group.

offset

property
offset: Vec2

Per-layer drawing offset.

opacity

property
opacity: float

Layer opacity from 0.0 to 1.0.

type

property

Layer type enum.

visible

property
visible: bool

Whether the layer is visible.

draw

method
draw(self, angle: float = 0.0, pivot: Vec2 = Vec2(0.500000, 0.500000)) -> None

Draw 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).

Find your next step

Start typing to search the manual.