Sector wave spawning fixes

This commit is contained in:
Anuken
2021-08-16 13:15:14 -04:00
parent ff5c48a2a0
commit 0c5f781702
9 changed files with 46 additions and 22 deletions
+13
View File
@@ -21,6 +21,7 @@ import static mindustry.Vars.*;
public class WaveSpawner{
private static final float margin = 40f, coreMargin = tilesize * 2f, maxSteps = 30;
private int tmpCount;
private Seq<Tile> spawns = new Seq<>();
private boolean spawning = false;
private boolean any = false;
@@ -162,6 +163,18 @@ public class WaveSpawner{
}
}
public int countGroundSpawns(){
tmpCount = 0;
eachGroundSpawn((x, y) -> tmpCount ++);
return tmpCount;
}
public int countFlyerSpawns(){
tmpCount = 0;
eachFlyerSpawn((x, y) -> tmpCount ++);
return tmpCount;
}
public boolean isSpawning(){
return spawning && !net.client();
}