Add support for parallax origin in maps

This commit is contained in:
Darren Eberly
2022-08-13 00:35:43 -04:00
parent 83ee2c420a
commit 9a92a32661
6 changed files with 36 additions and 7 deletions

View File

@@ -10,10 +10,11 @@ EXPECTED = tiled_map.TiledMap(
next_object_id=1,
orientation="orthogonal",
render_order="right-down",
tiled_version="1.6.0",
tiled_version="1.9.1",
tile_size=common_types.Size(32, 32),
version="1.6",
version="1.9",
background_color=common_types.Color(255, 0, 4, 255),
parallax_origin=common_types.OrderedPair(10, 15),
tilesets={
1: tileset.Tileset(
columns=8,

View File

@@ -6,6 +6,8 @@
"nextlayerid":2,
"nextobjectid":1,
"orientation":"orthogonal",
"parallaxoriginx":10,
"parallaxoriginy":15,
"properties":[
{
"name":"bool property - true",
@@ -38,7 +40,7 @@
"value":"Hello, World!!"
}],
"renderorder":"right-down",
"tiledversion":"1.9.0",
"tiledversion":"1.9.1",
"tileheight":32,
"tilesets":[
{

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.0" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" backgroundcolor="#ff0004" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="8" height="6" tilewidth="32" tileheight="32" infinite="0" parallaxoriginx="10" parallaxoriginy="15" backgroundcolor="#ff0004" nextlayerid="2" nextobjectid="1">
<properties>
<property name="bool property - true" type="bool" value="true"/>
<property name="color property" type="color" value="#ff49fcff"/>