Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2021-11-01 09:41:39 -04:00
9 changed files with 144 additions and 53 deletions

View File

@@ -0,0 +1,14 @@
package mindustry.entities;
import arc.math.*;
import mindustry.entities.Units.*;
import mindustry.gen.*;
public class UnitSorts{
public static Sortf
closest = Unit::dst2,
farthest = (u, x, y) -> -u.dst2(x, y),
strongest = (u, x, y) -> -u.maxHealth + Mathf.dst2(u.x, u.y, x, y) / 6400f,
weakest = (u, x, y) -> u.maxHealth + Mathf.dst2(u.x, u.y, x, y) / 6400f;
}