Skip to content

Commit

Permalink
Added the spawnDroidTower() after somebody deleted it
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamad11Dab committed Sep 12, 2023
1 parent 4b79697 commit 75a1cc3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion source/core/src/main/com/csse3200/game/areas/ForestGameArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void create() {
// spawnIncome();
spawnScrap();
spawnTNTTower();
// spawnDroidTower();
spawnDroidTower();
// spawnGapScanners();
// bossKing1 = spawnBossKing1();
// bossKing2 = spawnBossKing2();
Expand Down Expand Up @@ -567,6 +567,17 @@ private void spawnTNTTower() {
}

}

private void spawnDroidTower() {
GridPoint2 minPos = new GridPoint2(0, 0);
GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2);

for (int i = 0; i < NUM_WEAPON_TOWERS; i++) {
GridPoint2 randomPos = RandomUtils.random(minPos, maxPos);
Entity weaponTower = TowerFactory.createDroidTower();
spawnEntityAt(weaponTower, randomPos, true, true);
}
}


private void playMusic() {
Expand Down

0 comments on commit 75a1cc3

Please sign in to comment.