mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Calling Tilemap.worldToTileX
or worldToTileY
on a Isometric or Hexagonal Tilemap will now always return null
instead of doing nothing, as you cannot convert to a tile index using just one coordinate for these map types, you should use worldToTileXY
instead.
This commit is contained in:
parent
70cf842b8c
commit
cf657f4fc7
2 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var CONST = require('../const/ORIENTATION_CONST');
|
var CONST = require('../const/ORIENTATION_CONST');
|
||||||
var NOOP = require('../../utils/NOOP');
|
var NULL = require('../../utils/NULL');
|
||||||
var WorldToTileX = require('./WorldToTileX');
|
var WorldToTileX = require('./WorldToTileX');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,7 @@ var GetWorldToTileXFunction = function (orientation)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NOOP;
|
return NULL;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
var CONST = require('../const/ORIENTATION_CONST');
|
var CONST = require('../const/ORIENTATION_CONST');
|
||||||
var HexagonalWorldToTileY = require('./HexagonalWorldToTileY');
|
var HexagonalWorldToTileY = require('./HexagonalWorldToTileY');
|
||||||
var NOOP = require('../../utils/NOOP');
|
var NULL = require('../../utils/NULL');
|
||||||
var StaggeredWorldToTileY = require('./StaggeredWorldToTileY');
|
var StaggeredWorldToTileY = require('./StaggeredWorldToTileY');
|
||||||
var WorldToTileY = require('./WorldToTileY');
|
var WorldToTileY = require('./WorldToTileY');
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ var GetWorldToTileYFunction = function (orientation)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NOOP;
|
return NULL;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue