mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-13 00:05:23 +07:00
Added sector-specific spawns
This commit is contained in:
parent
4d88a8206a
commit
091f591ffb
@ -168,8 +168,10 @@ public class WaveSpawner{
|
||||
groundSpawns.clear();
|
||||
quadrants = new Bits(quadWidth() * quadHeight());
|
||||
|
||||
if(groups == null){
|
||||
if(world.getSector() == null){
|
||||
groups = Waves.getSpawns();
|
||||
}else{
|
||||
groups = world.getSector().spawns;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
package io.anuke.mindustry.maps;
|
||||
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.maps.goals.Goal;
|
||||
import io.anuke.mindustry.maps.goals.WaveGoal;
|
||||
import io.anuke.ucore.util.Bits;
|
||||
@ -15,12 +17,14 @@ public class Sector{
|
||||
public boolean complete;
|
||||
/**Slot ID of this sector's save. -1 means no save has been created.*/
|
||||
public int saveID = -1;
|
||||
/**Sector size; if more than 1, the coordinates are the bottom left corner.*/
|
||||
public int size = 1;
|
||||
/**Display texture. Needs to be disposed.*/
|
||||
public transient Texture texture;
|
||||
/**Goal of this sector-- what needs to be accomplished to unlock it.*/
|
||||
public transient Goal goal = new WaveGoal(30);
|
||||
/**Sector size; if more than 1, the coordinates are the bottom left corner.*/
|
||||
public int size = 1;
|
||||
/**Enemies spawned at this sector.*/
|
||||
public transient Array<SpawnGroup> spawns = new Array<>();
|
||||
|
||||
public SaveSlot getSave(){
|
||||
return control.getSaves().getByID(saveID);
|
||||
|
Loading…
Reference in New Issue
Block a user