Commit 6bcc3128 authored by Manuel Tondeur's avatar Manuel Tondeur Committed by Johnny Jazeix

gnumch, init level after bonus fades out

parent a255ebff
......@@ -48,9 +48,8 @@ ActivityBase {
// Set the cell invisible if it's the correct answer.
if (Activity.isAnswerCorrect(muncher.index)) {
modelCells.get(muncher.index).show = false
var levelDone = gridPart.isLevelDone()
if (levelDone) {
nextLevel()
if (gridPart.isLevelDone()) {
stopLevel();
}
} else {
modelCells.get(muncher.index).show = false
......@@ -74,14 +73,18 @@ ActivityBase {
Activity.initLevel();
operator = Activity._operator;
topPanel.goal = Activity.getGoal();
monsters.destroyAll();
spawningMonsters.stop();
timerActivateWarn.stop();
stopLevel();
if (Activity._currentLevel % 6 !== 0) {
spawningMonsters.restart();
}
}
function stopLevel() {
monsters.destroyAll();
spawningMonsters.stop();
timerActivateWarn.stop();
}
anchors.fill: parent
color: "#ABCDEF"
signal start
......@@ -384,6 +387,10 @@ ActivityBase {
Bonus {
id: bonus
onStop: {
parent.nextLevel();
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment