mirror of
https://github.com/photonstorm/phaser
synced 2025-01-25 11:25:15 +00:00
15 lines
468 B
JavaScript
15 lines
468 B
JavaScript
var WorldToTileX = require('./WorldToTileX');
|
|
var WorldToTileY = require('./WorldToTileY');
|
|
var Vector2 = require('../../../math/Vector2');
|
|
|
|
var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)
|
|
{
|
|
if (point === undefined) { point = new Vector2(0, 0); }
|
|
|
|
point.x = WorldToTileX(worldX, snapToFloor, camera, layer);
|
|
point.y = WorldToTileY(worldY, snapToFloor, camera, layer);
|
|
|
|
return point;
|
|
};
|
|
|
|
module.exports = WorldToTileXY;
|