mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 19:43:28 +00:00
13 lines
287 B
JavaScript
13 lines
287 B
JavaScript
|
var HasTileAt = function (tileX, tileY, layer)
|
||
|
{
|
||
|
if (layer.data[tileY] === undefined || layer.data[tileY][tileX] === undefined)
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
var tile = layer.data[tileY][tileX];
|
||
|
return (tile !== null && tile.index > -1);
|
||
|
};
|
||
|
|
||
|
module.exports = HasTileAt;
|