Files
Mindustry/core/src/mindustry/logic/RadarTarget.java
2020-09-25 07:58:44 -04:00

28 lines
720 B
Java

package mindustry.logic;
import mindustry.game.*;
import mindustry.gen.*;
public enum RadarTarget{
any((team, other) -> true),
enemy((team, other) -> team != other.team),
ally((team, other) -> team == other.team),
player((team, other) -> other.isPlayer()),
attacker((pos, other) -> other.canShoot()),
flying((team, other) -> other.isFlying()),
boss((team, other) -> other.isBoss()),
ground((team, other) -> other.isGrounded());
public final RadarTargetFunc func;
public static final RadarTarget[] all = values();
RadarTarget(RadarTargetFunc func){
this.func = func;
}
public interface RadarTargetFunc{
boolean get(Team team, Unit other);
}
}