Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886)

This commit is contained in:
photonstorm 2014-08-29 18:03:32 +01:00
parent 5546e5903c
commit 92386221e4
2 changed files with 7 additions and 1 deletions

View file

@ -122,6 +122,7 @@ Version 2.1.0 - "Cairhien" - -in development-
* GamePad and SinglePad onAxisCallback parameters have changed. You are now sent: this (a reference to the SinglePad that caused the callback), the axis index and the axis value in that order.
* If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to `1 / 60 * 1000` as it's a ms value (thanks @casensiom #899)
* Tiled polylines are now imported into the map objects property as well as map collision (#1117)
* Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886)
### Bug Fixes

View file

@ -222,7 +222,7 @@ Phaser.Tile.prototype = {
},
/**
* Set collision settings on this tile.
* Sets the collision flags for each side of this tile and updates the interesting faces list.
*
* @method Phaser.Tile#setCollision
* @param {boolean} left - Indicating collide with any object on the left.
@ -237,6 +237,11 @@ Phaser.Tile.prototype = {
this.collideUp = up;
this.collideDown = down;
this.faceLeft = left;
this.faceRight = right;
this.faceTop = up;
this.faceBottom = down;
},
/**