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.fontProperties
when creating a Text object. - The default Text#testString changed to
|MÂÉQfjq_
.
Tilemaps
- Tilemap object properties
ellipse
,gid
,point
,polygon
,polyline
,properties
,rectangle
,template
, andtext
have default values (false
ornull
). - Tilemap object
properties
is 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.fontProperties
when creating a Text game object or in Text#setStyle(). - You can pass
style.testString
when 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()
search
argument is an array, e.g.['type', 'enemy']
, it matches objects with that property name and value. - When the Tilemap#createFromObjects()
search
argument isnull
, it matches all objects in the layer. - When the Tilemap#createFromObjects()
group
argument 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.