"""
import pygame.locals as pgl
+import random
-from naja.constants import KEYS
+from naja.constants import KEYS, TUNES
from naja.events import SceneChangeEvent, finish_event
from naja.options import options
from naja.scenes.scene import Scene
self.add(info)
self.add(RobotWidget(state))
sound.play_sound('startup.ogg')
+ background_track = random.choice(TUNES)
+ sound.play_music(background_track, 0.25)
def handle_scene_event(self, ev):
from naja.scenes.menu import MenuScene
if ev.type == pgl.KEYDOWN:
if ev.key in KEYS.QUIT:
+ sound.stop()
SceneChangeEvent.post(MenuScene)
return
if options.cheat_enabled: