Bugfix: Level does not care after the last interval ended.
This commit is contained in:
parent
5610ff7806
commit
c810d9d966
@ -84,7 +84,9 @@ public final class Level {
|
|||||||
public void handleUpdateTick() {
|
public void handleUpdateTick() {
|
||||||
//Check whether the current interval is configured
|
//Check whether the current interval is configured
|
||||||
int currentIntervalIndex = this.config.getIntervalIndexByCurrentTime(this.levelClock);
|
int currentIntervalIndex = this.config.getIntervalIndexByCurrentTime(this.levelClock);
|
||||||
if(currentIntervalIndex == -1) return; //Nothing to do
|
|
||||||
|
//If there are still configured intervals, take care of the rules
|
||||||
|
if(currentIntervalIndex != -1) {
|
||||||
//Fetch the current interval
|
//Fetch the current interval
|
||||||
int[] currentInterval = this.config.intervalList.get(currentIntervalIndex);
|
int[] currentInterval = this.config.intervalList.get(currentIntervalIndex);
|
||||||
int relativeTimeWithinCurrentInterval = this.levelClock - currentInterval[0];
|
int relativeTimeWithinCurrentInterval = this.levelClock - currentInterval[0];
|
||||||
@ -115,6 +117,7 @@ public final class Level {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} //end if still intervals configured
|
||||||
|
|
||||||
//Check for GameOver things.
|
//Check for GameOver things.
|
||||||
this.checkGameOverCondition();
|
this.checkGameOverCondition();
|
||||||
|
Loading…
Reference in New Issue
Block a user