Commit 8688d778 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

memory, use the bonus interval instead of our own

parent bd796c63
......@@ -58,7 +58,7 @@ ActivityBase {
QtObject {
id: items
property alias bar: bar
property alias bonusTimer: bonusTimer
property alias bonus: bonus
property GCAudio audioEffects: activity.audioEffects
property bool withTux: activity.withTux
property bool tuxTurn: false
......@@ -185,26 +185,9 @@ ActivityBase {
}
}
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)
}
}
......
......@@ -226,11 +226,11 @@ function tuxPlay() {
function youWon() {
items.bonusTimer.good()
items.bonus.good("flower")
}
function youLoose(){
items.bonusTimer.bad()
items.bonus.bad("flower")
if (items.withTux){
initLevel()
}
......
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