Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean withinDistance(WorldTile tile, int distance) {
- if (tile.plane != plane)
- return false;
- int deltaX = tile.x - x, deltaY = tile.y - y;
- return deltaX <= distance && deltaX >= -distance && deltaY <= distance && deltaY >= -distance;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement