Turret-based radar

This commit is contained in:
Anuken
2020-08-10 23:04:52 -04:00
parent 4f7d6fc018
commit 75ada3cca1
19 changed files with 377 additions and 29 deletions
+25
View File
@@ -0,0 +1,25 @@
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()),
flying((team, other) -> other.isFlying()),
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);
}
}