mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-07 03:41:20 +01:00
fix: Removed redundant checking of polygon in caster
This commit is contained in:
@@ -281,9 +281,8 @@ def _cast_polygon(raw_tiled_object: RawTiledObject) -> Polygon:
|
|||||||
Polygon: The Polygon object created from the raw_tiled_object
|
Polygon: The Polygon object created from the raw_tiled_object
|
||||||
"""
|
"""
|
||||||
polygon = []
|
polygon = []
|
||||||
if raw_tiled_object.get("polygon"):
|
for point in raw_tiled_object["polygon"]:
|
||||||
for point in raw_tiled_object["polygon"]:
|
polygon.append(OrderedPair(point["x"], point["y"]))
|
||||||
polygon.append(OrderedPair(point["x"], point["y"]))
|
|
||||||
|
|
||||||
return Polygon(points=polygon, **_get_common_attributes(raw_tiled_object).__dict__)
|
return Polygon(points=polygon, **_get_common_attributes(raw_tiled_object).__dict__)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user