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() {
|
||||
//Check whether the current interval is configured
|
||||
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
|
||||
int[] currentInterval = this.config.intervalList.get(currentIntervalIndex);
|
||||
int relativeTimeWithinCurrentInterval = this.levelClock - currentInterval[0];
|
||||
|
@ -115,6 +117,7 @@ public final class Level {
|
|||
}
|
||||
}
|
||||
}
|
||||
} //end if still intervals configured
|
||||
|
||||
//Check for GameOver things.
|
||||
this.checkGameOverCondition();
|
||||
|
|
Loading…
Reference in New Issue