mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-26 17:02:28 +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 pytiled_parser import common_types, tiled_object, tileset
|
||||
from pytiled_parser import common_types, layer, tiled_object, tileset
|
||||
|
||||
EXPECTED = tileset.TileSet(
|
||||
columns=0,
|
||||
@@ -33,30 +33,54 @@ EXPECTED = tileset.TileSet(
|
||||
image=Path("../../images/tile_02.png"),
|
||||
image_height=32,
|
||||
image_width=32,
|
||||
objects=[
|
||||
tiled_object.Rectangle(
|
||||
id=2,
|
||||
size=common_types.Size(14.4766410408043, 13.7196924896511),
|
||||
name="",
|
||||
rotation=0,
|
||||
type="",
|
||||
visible=True,
|
||||
coordinates=common_types.OrderedPair(
|
||||
13.4358367829687, 13.5304553518628
|
||||
objects=layer.ObjectLayer(
|
||||
name="",
|
||||
opacity=1,
|
||||
visible=True,
|
||||
draw_order="index",
|
||||
tiled_objects=[
|
||||
tiled_object.Rectangle(
|
||||
id=2,
|
||||
name="",
|
||||
size=common_types.Size(14.4766410408043, 13.7196924896511),
|
||||
rotation=0,
|
||||
type="",
|
||||
visible=True,
|
||||
coordinates=common_types.OrderedPair(
|
||||
13.4358367829687, 13.5304553518628
|
||||
),
|
||||
),
|
||||
),
|
||||
tiled_object.Ellipse(
|
||||
id=3,
|
||||
size=common_types.Size(14.287403903016, 11.070372560615),
|
||||
name="",
|
||||
rotation=0,
|
||||
type="",
|
||||
visible=True,
|
||||
coordinates=common_types.OrderedPair(
|
||||
13.8143110585452, 1.98698994677705
|
||||
tiled_object.Ellipse(
|
||||
id=3,
|
||||
name="",
|
||||
size=common_types.Size(14.287403903016, 11.070372560615),
|
||||
rotation=0,
|
||||
type="",
|
||||
visible=True,
|
||||
coordinates=common_types.OrderedPair(
|
||||
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