Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859)

This commit is contained in:
photonstorm 2014-08-28 04:30:13 +01:00
parent a7d9b2c8c5
commit 2d4d1a050d
2 changed files with 2 additions and 1 deletions

View file

@ -130,6 +130,7 @@ Version 2.1.0 - "Cairhien" - -in development-
* InputHandler docs updated to avoid Pointer data-type confusion (#1097)
* If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills #1053)
* The P2.World.postBroadphaseHandler now checks if the returned pairs array is empty or not before processing it (thanks @wayfu #934)
* Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859)
### p2.js 0.6.0 Changes and New Features

View file

@ -1084,7 +1084,7 @@ Phaser.Tilemap.prototype = {
layer = this.getLayer(layer);
return (this.layers[layer].data[y] !== null && this.layers[layer].data[y][x] !== null);
return (this.layers[layer].data[y][x].index > -1);
},