Victory tune
authorNeil <neil@dip.sun.ac.za>
Sat, 17 May 2014 14:55:13 +0000 (16:55 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 17 May 2014 15:05:12 +0000 (17:05 +0200)
data/music/A_ninja.ogg [new file with mode: 0644]
data/music/SOURCES.txt
naja/scenes/win.py

diff --git a/data/music/A_ninja.ogg b/data/music/A_ninja.ogg
new file mode 100644 (file)
index 0000000..096fc83
Binary files /dev/null and b/data/music/A_ninja.ogg differ
index 45732a9c763ce5e02435cd1bf087d1350edc93c1..e56f304e8bed1dfa5c1fa426b040e492da074667 100644 (file)
@@ -47,3 +47,11 @@ Music files by Rolemusic:
       Converted to ogg via:
           mpg123 -w test.wav another_beek_beep_beer_please.mp3
           sox test.wav another_beek.ogg vol 0.25 amplitude
+
+   A_ninja.ogg
+      A ninja among culturachippers
+      Downloaded from: http://freemusicarchive.org/music/Rolemusic/gigs_n_contest/rolemusic_-_gigs_n_contest_-_01_A_ninja_among_culturachippers
+      License: Creative Commons Attribution (CC-BY) (http://creativecommons.org/licenses/by/4.0/)
+      Converted to ogg via:
+          mpg123 -w test.wav A_ninja.mp3
+          sox test.wav A_ninja.ogg vol 0.25 amplitude channels 1
index f8b42b32e63f49cd239d08177bc648ea8f4eac76..cb3275deee85ac38a0b128a8f6bfc9dbdac683fa 100644 (file)
@@ -6,6 +6,7 @@ import pygame.locals as pgl
 
 from naja.constants import KEYS, PALETTE
 from naja.events import SceneChangeEvent
+from naja.sound import sound
 from naja.scenes.scene import Scene
 from naja.widgets.image_box import ImageBox
 from naja.widgets.text import TextWidget, TextBoxWidget
@@ -37,9 +38,11 @@ class WinScene(Scene):
             colour=PALETTE.WHITE, padding=1, border=1,
             bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLACK,
             box_width=300))
+        sound.play_music('A_ninja.ogg')
 
     def handle_scene_event(self, ev):
         from naja.scenes.menu import MenuScene
         if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
+            sound.stop()
             SceneChangeEvent.post(MenuScene)
             return