tilemap.MapObject
pykraken.tilemap.MapObject MapObject represents a placed object on an object layer.
More about tilemap.MapObject
Attributes
- transform (
Transform) — Transformation component for the object. - visible (
bool) — Visibility flag. - uid (
int) — Unique identifier. - name (
str) — Object name. - type (
str) — Object type string. - rect (
Rect) — Bounding rectangle. - tile_id (
int) — Associated tile id if the object is a tile. - shape_type (
ShapeType) — The shape enum for the object. - vertices (
list[Vec2]) — Vertex list for polygon/polyline shapes. - text (
TextProperties) — Text properties when shape is text.
At a glance
11 membersReference
PYTHON APIConstructor
methodtilemap.MapObject(/, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.
is_visible
propertyis_visible: boolVisibility flag.
name
propertyname: strObject name.
rect
propertyrect: RectObject bounding rectangle.
shape_type
propertyshape_type: tilemap.MapObject.ShapeTypeShape type enum for the object.
text
propertytext: tilemap.TextPropertiesText properties if the object is text.
tile_id
propertytile_id: intAssociated tile id when the object is a tile.
transform
propertytransform: TransformTransform component for the object.
type
propertytype: strObject type string.
uid
propertyuid: intUnique object identifier.
vertices
propertyvertices: list[Vec2]List of vertices for polygon/polyline shapes.