Physics.Arcade.sort now calls one of four functions: sortLeftRight, sortRightLeft, sortTopBottom and sortBottomTop. Each of which takes 2 Sprites as arguments.
Physics.Arcade.sort now doesn't bail out if the Group contains a mixture of physics and non-physics enabled objects, as the Group hash is now only ever populated with physics enabled objects. Also the sort comparison functions no longer return -1 if the bodies are invalid, but zero instead (#1721)
The description of the method stated that you could pass a string to look up an object layer based on its name, but the original code only looked for a gui property, regardless of type.
I'm using Tiled 0.11.0 on OSX, and my exported json-file doesn't contain a gui property on the object layers. Here's a snippet of my file:
```
{
"layers":[
{
"draworder":"topdown",
"height":0,
"name":"Objects",
"objects":[
{
"height":48,
"id":1,
"name":"pier",
"properties":
{
},
"rotation":0,
"type":"",
"visible":true,
"width":64,
"x":208,
"y":240
}],
"opacity":1,
"properties":
{
"type":"pier"
},
"type":"objectgroup",
"visible":true,
"width":0,
"x":0,
"y":0
}]
}]
}
```
The property in my file is called id and not uid. This might be due to changes in one of the later releases of Tiled. I kept the check for uid to avoid possibly breaking compatibility with older versions of Tiled.
I also added scaling of the sprite.
Feel free to make formatting changes, or rewrite the function to better fit the programming style of Phaser.
* Passing a value of zero as the value of duration causes the
calculations performed in Tween#update to divide by zero when
calculating the next step for the tween. This causes the tweened
property value to be set to NaN having undesireable results and
also, causes the tween to never end since the ending criteria are
never met.
Since Tilemap.getTile lets you specify wether to return null
or an empty tile when index is -1, the WorldXY equivalent
should offer the same possibility for a more unified interface.
* Passing a value of zero as the value of duration causes the
calculations performed in Tween#update to divide by zero when
calculating the next step for the tween. This causes the tweened
property value to be set to NaN having undesireable results and
also, causes the tween to never end since the ending criteria are
never met.