phaser/v3/src/gameobjects/tilemap/components/GetTileAtWorldXY.js

14 lines
406 B
JavaScript
Raw Normal View History

2017-11-16 19:27:52 +00:00
var GetTileAt = require('./GetTileAt');
var WorldToTileX = require('./WorldToTileX');
var WorldToTileY = require('./WorldToTileY');
2017-11-16 19:27:52 +00:00
var GetTileAtWorldXY = function (worldX, worldY, nonNull, camera, layer)
2017-11-16 19:27:52 +00:00
{
var tileX = WorldToTileX(worldX, camera, layer);
var tileY = WorldToTileY(worldY, camera, layer);
2017-11-16 19:27:52 +00:00
return GetTileAt(tileX, tileY, nonNull, layer);
};
module.exports = GetTileAtWorldXY;