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