mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-01-24 19:21:48 +01:00
tests: implemented idnividual image tileset test with animated tiles and collision objects layer.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from pytiled_parser import common_types, tiled_object, tileset
|
from pytiled_parser import common_types, layer, tiled_object, tileset
|
||||||
|
|
||||||
EXPECTED = tileset.TileSet(
|
EXPECTED = tileset.TileSet(
|
||||||
columns=0,
|
columns=0,
|
||||||
@@ -33,30 +33,54 @@ EXPECTED = tileset.TileSet(
|
|||||||
image=Path("../../images/tile_02.png"),
|
image=Path("../../images/tile_02.png"),
|
||||||
image_height=32,
|
image_height=32,
|
||||||
image_width=32,
|
image_width=32,
|
||||||
objects=[
|
objects=layer.ObjectLayer(
|
||||||
tiled_object.Rectangle(
|
name="",
|
||||||
id=2,
|
opacity=1,
|
||||||
size=common_types.Size(14.4766410408043, 13.7196924896511),
|
visible=True,
|
||||||
name="",
|
draw_order="index",
|
||||||
rotation=0,
|
tiled_objects=[
|
||||||
type="",
|
tiled_object.Rectangle(
|
||||||
visible=True,
|
id=2,
|
||||||
coordinates=common_types.OrderedPair(
|
name="",
|
||||||
13.4358367829687, 13.5304553518628
|
size=common_types.Size(14.4766410408043, 13.7196924896511),
|
||||||
|
rotation=0,
|
||||||
|
type="",
|
||||||
|
visible=True,
|
||||||
|
coordinates=common_types.OrderedPair(
|
||||||
|
13.4358367829687, 13.5304553518628
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
tiled_object.Ellipse(
|
||||||
tiled_object.Ellipse(
|
id=3,
|
||||||
id=3,
|
name="",
|
||||||
size=common_types.Size(14.287403903016, 11.070372560615),
|
size=common_types.Size(14.287403903016, 11.070372560615),
|
||||||
name="",
|
rotation=0,
|
||||||
rotation=0,
|
type="",
|
||||||
type="",
|
visible=True,
|
||||||
visible=True,
|
coordinates=common_types.OrderedPair(
|
||||||
coordinates=common_types.OrderedPair(
|
13.8143110585452, 1.98698994677705
|
||||||
13.8143110585452, 1.98698994677705
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
|
properties={"string property": "testing"},
|
||||||
|
type="tile",
|
||||||
|
),
|
||||||
|
tileset.Tile(
|
||||||
|
id=2,
|
||||||
|
image=Path("../../images/tile_03.png"),
|
||||||
|
image_height=32,
|
||||||
|
image_width=32,
|
||||||
|
properties={"bool property": True},
|
||||||
|
type="tile",
|
||||||
|
),
|
||||||
|
tileset.Tile(
|
||||||
|
id=3,
|
||||||
|
image=Path("../../images/tile_04.png"),
|
||||||
|
image_height=32,
|
||||||
|
image_width=32,
|
||||||
|
properties={"color property": common_types.Color("#ff5500ff")},
|
||||||
|
type="tile",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user