Multithreading cleanup

This commit is contained in:
Anuken
2018-10-10 23:43:48 -04:00
parent 67db5e9dfc
commit 52bd079c0a
18 changed files with 50 additions and 359 deletions

View File

@@ -54,14 +54,17 @@ public class Units{
return invalidateTarget(target, targeter.team, targeter.x, targeter.y, targeter.getWeapon().getAmmo().getRange());
}
/**
* Returns whether there are any entities on this tile.
*/
/**Returns whether there are any entities on this tile.*/
public static boolean anyEntities(Tile tile){
Block type = tile.block();
rect.setSize(type.size * tilesize, type.size * tilesize);
rect.setCenter(tile.drawx(), tile.drawy());
return anyEntities(rect);
}
public static boolean anyEntities(Rectangle rect){
boolResult = false;
Units.getNearby(rect, unit -> {
@@ -78,9 +81,7 @@ public class Units{
return boolResult;
}
/**
* Returns whether there are any entities on this tile, with the hitbox expanded.
*/
/**Returns whether there are any entities on this tile, with the hitbox expanded.*/
public static boolean anyEntities(Tile tile, float expansion, Predicate<Unit> pred){
Block type = tile.block();
rect.setSize(type.size * tilesize + expansion, type.size * tilesize + expansion);