mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Merge pull request #2304 from cy-ryo-fujiwara/bug-map-hastile
Fixed a bug of tilemap.hasTile
This commit is contained in:
commit
dd02f0b482
1 changed files with 3 additions and 2 deletions
|
@ -1219,9 +1219,10 @@ Phaser.Tilemap.prototype = {
|
|||
hasTile: function (x, y, layer) {
|
||||
|
||||
layer = this.getLayer(layer);
|
||||
|
||||
if (this.layers[layer].data[y] === undefined || this.layers[layer].data[y][x] === undefined) {
|
||||
return false;
|
||||
}
|
||||
return (this.layers[layer].data[y][x].index > -1);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue