mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Generate spawn buildings before other structures
This commit is contained in:
parent
5a28facf07
commit
3b88a8012c
1 changed files with 3 additions and 4 deletions
|
@ -26,6 +26,9 @@ public class StructureGenerator implements GeneratorTask {
|
|||
public void generate(GeneratorContext ctx) {
|
||||
int width = ctx.getWidth();
|
||||
int height = ctx.getHeight();
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.2));
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.5));
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.8));
|
||||
|
||||
for(Prefab structure : uniqueStructures) {
|
||||
int x = ctx.nextInt(width - 2) + 1;
|
||||
|
@ -53,10 +56,6 @@ public class StructureGenerator implements GeneratorTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.2));
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.5));
|
||||
placeRandomSpawnTower(ctx, (int)(width * 0.8));
|
||||
}
|
||||
|
||||
private void placeRandomSpawnTower(GeneratorContext ctx, int x) {
|
||||
|
|
Loading…
Add table
Reference in a new issue