-bool Entity::TileLock(int width, int height) const {
- Vector<int> tilePosition(
- position.X() - (width / 2),
- position.Y());
- return (tilePosition.X() % width == 0) && (tilePosition.Y() % height == 0);
+bool Entity::TileLock(const geometry::Vector<int> &tileSize) const {
+ // TODO: change position to point to the top-left corner of a tile
+ Vector<int> tilePosition(position);
+ return (tilePosition.X() % tileSize.X() == 0) && (tilePosition.Y() % tileSize.Y() == 0);