Basic unitsorts for hjson (#6280)
* Create some basic unitSorts * Set as defaults * add to ContentParser
This commit is contained in:
14
core/src/mindustry/entities/UnitSorts.java
Normal file
14
core/src/mindustry/entities/UnitSorts.java
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user