This commit is contained in:
ramapcsx2 2014-12-09 11:16:34 +01:00
commit be8f7a231f
1 changed files with 32 additions and 29 deletions

View File

@ -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();