Commit 6e8cc051 authored by Bruno Coudoin's avatar Bruno Coudoin

Added a bonus flower feedback in watercycle to let the children knows he completed the level.

Thanks to Clara Coudoin for the feedback, it is great to have close beta testers.
parent a1db6767
......@@ -22,6 +22,7 @@ import gcompris.utils
import gcompris.anim
import gcompris.sound
import gcompris.bonus
import gtk
import gtk.gdk
......@@ -47,6 +48,9 @@ class Gcompris_watercycle:
# Need to manage the timers to quit properly
self.waterlevel_timer = 0
# Used to display the bonus a single time
self.you_won = False
gcompris.sound.play_ogg("sounds/Harbor1.wav", "sounds/Harbor3.wav")
# Create our rootitem. We put each canvas item in it so at the end we
......@@ -476,6 +480,9 @@ class Gcompris_watercycle:
if (self.waterlevel > self.waterlevel_min) and self.showerbutton:
self.tuxshowerwateritem.props.visibility = goocanvas.ITEM_VISIBLE
if not self.you_won:
gcompris.bonus.display(gcompris.bonus.WIN, gcompris.bonus.FLOWER)
self.you_won = True
self.tuxshowerwateritem.props.visibility = goocanvas.ITEM_INVISIBLE
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