Phaser CE v2.19.0
API Changes
Text
- Text height is now calculated from actualBoundingBoxAscent and actualBoundingBoxDescent where available or estimated from character widths otherwise. If you need uniform display across devices, it's best to pass
style.fontPropertieswhen creating a Text object. - The default Text#testString changed to
|MÂÉQfjq_.
Tilemaps
- Tilemap object properties
ellipse,gid,point,polygon,polyline,properties,rectangle,template, andtexthave default values (falseornull). - Tilemap object
propertiesis an object, as in the Tiled JSON v1.1 format (#623). - Tilemap#createFromObjects() returns an array instead of
undefined.
New Features
- You can pass
style.fontPropertieswhen creating a Text game object or in Text#setStyle(). - You can pass
style.testStringwhen creating a Text game object or in Text#setStyle(). - Tilemap#getObject() gets a tilemap object by
id, from any object layer. - Tilemap#getObjects() gets the tilemap objects matching the given property name and value.
Updates
- When the Tilemap#createFromObjects()
searchargument is an array, e.g.['type', 'enemy'], it matches objects with that property name and value. - When the Tilemap#createFromObjects()
searchargument isnull, it matches all objects in the layer. - When the Tilemap#createFromObjects()
groupargument isnull, it doesn't add the created sprites to a group.
Bug Fixes
- Tilemap#createFromObjects() was adjusting y-coordinates for all tile objects, which was incorrect. Now it adjusts y-coordinates for tile objects only, which have origin (0, 1) in Tiled.