Skip to content

Commit

Permalink
merge from main, fixed engineer and mob outside map bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Oct 17, 2023
1 parent 7ecd745 commit 6bf18e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void update() {
if ((mob.getComponent(CombatStatsComponent.class).getHealth() <= 0 && !deathFlag)) {
// decrement engineer count
// ! tests failing because of textbox
ServiceLocator.getGameEndService().updateEngineerCount();
// ServiceLocator.getGameEndService().updateEngineerCount();
changeState(State.DEATH);
animate();
movementTask.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public WaveClass getWave(int index) {
public void spawnWave() {
if (gameTime.getTime() >= startTime + spawnDelay * 1000) {
do {
currentRandom = MathUtils.random(0, ServiceLocator.getMapService().getHeight());
currentRandom = MathUtils.random(0, ServiceLocator.getMapService().getHeight() - 1);
} while (currentRandom == previousRandom);
ServiceLocator.getWaveService().setNextLane(currentRandom);
GridPoint2 randomPos = new GridPoint2(19, currentRandom);
Expand Down

0 comments on commit 6bf18e3

Please sign in to comment.