@@ -119,6 +119,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
119119 * @method Phaser.Physics.Arcade#separateTile
120120 * @param {Phaser.Physics.Arcade.Body } body - The Body object to separate.
121121 * @param {Phaser.Tile } tile - The tile to collide against.
122+ * @param {Phaser.TilemapLayer } tilemapLayer - The tilemapLayer to collide against.
122123 * @return {boolean } Returns true if the body was separated, otherwise false.
123124 */
124125 separateTile : function ( i , body , tile , tilemapLayer , overlapOnly ) {
@@ -188,7 +189,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
188189 {
189190 if ( tile . faceLeft || tile . faceRight )
190191 {
191- ox = this . tileCheckX ( body , tile ) ;
192+ ox = this . tileCheckX ( body , tile , tilemapLayer ) ;
192193
193194 // That's horizontal done, check if we still intersects? If not then we can return now
194195 if ( ox !== 0 && ! tile . intersects ( ( body . position . x - tilemapLayer . position . x ) , ( body . position . y - tilemapLayer . position . y ) , ( body . right - tilemapLayer . position . x ) , ( body . bottom - tilemapLayer . position . y ) ) )
@@ -199,14 +200,14 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
199200
200201 if ( tile . faceTop || tile . faceBottom )
201202 {
202- oy = this . tileCheckY ( body , tile ) ;
203+ oy = this . tileCheckY ( body , tile , tilemapLayer ) ;
203204 }
204205 }
205206 else
206207 {
207208 if ( tile . faceTop || tile . faceBottom )
208209 {
209- oy = this . tileCheckY ( body , tile ) ;
210+ oy = this . tileCheckY ( body , tile , tilemapLayer ) ;
210211
211212 // That's vertical done, check if we still intersects? If not then we can return now
212213 if ( oy !== 0 && ! tile . intersects ( ( body . position . x - tilemapLayer . position . x ) , ( body . position . y - tilemapLayer . position . y ) , ( body . right - tilemapLayer . position . x ) , ( body . bottom - tilemapLayer . position . y ) ) )
@@ -217,7 +218,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
217218
218219 if ( tile . faceLeft || tile . faceRight )
219220 {
220- ox = this . tileCheckX ( body , tile ) ;
221+ ox = this . tileCheckX ( body , tile , tilemapLayer ) ;
221222 }
222223 }
223224
@@ -232,6 +233,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
232233 * @method Phaser.Physics.Arcade#tileCheckX
233234 * @param {Phaser.Physics.Arcade.Body } body - The Body object to separate.
234235 * @param {Phaser.Tile } tile - The tile to check.
236+ * @param {Phaser.TilemapLayer } tilemapLayer - The tilemapLayer to collide against.
235237 * @return {number } The amount of separation that occurred.
236238 */
237239 tileCheckX : function ( body , tile , tilemapLayer ) {
@@ -288,6 +290,7 @@ Phaser.Physics.Arcade.TilemapCollision.prototype = {
288290 * @method Phaser.Physics.Arcade#tileCheckY
289291 * @param {Phaser.Physics.Arcade.Body } body - The Body object to separate.
290292 * @param {Phaser.Tile } tile - The tile to check.
293+ * @param {Phaser.TilemapLayer } tilemapLayer - The tilemapLayer to collide against.
291294 * @return {number } The amount of separation that occurred.
292295 */
293296 tileCheckY : function ( body , tile , tilemapLayer ) {
0 commit comments