mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +01:00
removed opacity attribute from TiledObject as that is not actually a possible attribute of Tiled Objects.
This commit is contained in:
@@ -35,7 +35,6 @@ class TiledObject:
|
||||
coordinates: OrderedPair
|
||||
size: Size = Size(0, 0)
|
||||
rotation: float = 0
|
||||
opacity: float = 1
|
||||
visible: bool
|
||||
|
||||
name: Optional[str] = None
|
||||
@@ -179,7 +178,6 @@ class RawTiledObject(TypedDict):
|
||||
width: float
|
||||
height: float
|
||||
rotation: float
|
||||
opacity: float
|
||||
visible: bool
|
||||
name: str
|
||||
type: str
|
||||
@@ -217,9 +215,6 @@ def _get_common_attributes(raw_tiled_object: RawTiledObject) -> TiledObject:
|
||||
if raw_tiled_object.get("rotation") is not None:
|
||||
common_attributes.rotation = raw_tiled_object["rotation"]
|
||||
|
||||
if raw_tiled_object.get("opacity") is not None:
|
||||
common_attributes.opacity = raw_tiled_object["opacity"]
|
||||
|
||||
if raw_tiled_object.get("name") is not None:
|
||||
common_attributes.name = raw_tiled_object["name"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user