Commit bd796c63 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

findit, use the bonus interval instead of our own

parent 72115bb2
......@@ -59,7 +59,7 @@ ActivityBase {
id: items
property alias background: background
property alias bar: bar
property alias bonusTimer: bonusTimer
property alias bonus: bonus
property alias containerModel: containerModel
property alias questionItem: questionItem
// On startup we want to queue the first sound but not after
......@@ -218,26 +218,9 @@ ActivityBase {
anchors.margins: 0
}
Timer {
id: bonusTimer
interval: 2000
property bool win
function good() {
win = true
start()
}
function bad() {
win = false
start()
}
onTriggered: win ? bonus.good("flower") : bonus.bad("flower")
}
Bonus {
id: bonus
interval: 2000
Component.onCompleted: win.connect(Activity.nextLevel)
}
}
......
......@@ -72,7 +72,7 @@ function initQuestion() {
function nextQuestion() {
if(dataset[currentLevel].length <= currentQuestion + 1) {
items.bonusTimer.good()
items.bonus.good("flower")
} else {
currentQuestion++
items.score.currentSubLevel++
......
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