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