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:
Richard Davey 2022-11-24 00:42:13 +00:00
parent 70cf842b8c
commit cf657f4fc7
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@
*/
var CONST = require('../const/ORIENTATION_CONST');
var NOOP = require('../../utils/NOOP');
var NULL = require('../../utils/NULL');
var WorldToTileX = require('./WorldToTileX');
/**
@ -26,7 +26,7 @@ var GetWorldToTileXFunction = function (orientation)
}
else
{
return NOOP;
return NULL;
}
};

View file

@ -6,7 +6,7 @@
var CONST = require('../const/ORIENTATION_CONST');
var HexagonalWorldToTileY = require('./HexagonalWorldToTileY');
var NOOP = require('../../utils/NOOP');
var NULL = require('../../utils/NULL');
var StaggeredWorldToTileY = require('./StaggeredWorldToTileY');
var WorldToTileY = require('./WorldToTileY');
@ -36,7 +36,7 @@ var GetWorldToTileYFunction = function (orientation)
}
else
{
return NOOP;
return NULL;
}
};