Mercurial > mamba
changeset 320:13eaea2365b3
Stop music on scene changes
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 19:34:14 +0200 |
parents | d8770b73e77e |
children | 014aa3a97b2c |
files | mamba/engine.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mamba/engine.py Fri Sep 16 19:30:18 2011 +0200 +++ b/mamba/engine.py Fri Sep 16 19:34:14 2011 +0200 @@ -1,6 +1,7 @@ """Game engine and top-level game loop.""" from mamba.constants import SCREEN, FPS +from mamba.sound import stop_sound import pygame.event import pygame.display @@ -45,6 +46,7 @@ def __init__(self, size=SCREEN): from mamba.widgets.base import Container + stop_sound() # Always stop any music on scene changes self.surface_size = size self.surface = None self.container = Container(pygame.Rect((0, 0), self.surface_size))