diff --git a/src/activities/gnumch-equality/Gnumch.qml b/src/activities/gnumch-equality/Gnumch.qml --- a/src/activities/gnumch-equality/Gnumch.qml +++ b/src/activities/gnumch-equality/Gnumch.qml @@ -48,9 +48,8 @@ // 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 @@ 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(); + spawningMonsters.stop(); + } + anchors.fill: parent color: "#ABCDEF" signal start @@ -384,6 +387,10 @@ Bonus { id: bonus + + onStop: { + parent.nextLevel(); + } } } }