Changeset 236

Show
Ignore:
Timestamp:
01/05/07 02:09:01 (5 years ago)
Author:
mg
Message:

Add a sound effect for launching missiles.

Location:
trunk
Files:
3 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/NEWS.txt

    r235 r236  
    88    a better video mode; if not, give a better first impression by avoiding 
    99    sluggishness. 
     10  - Sound effects!  Well, one sound effect. 
    1011 
    1112December 25, 2006: Released version 0.9.3: the Christmas release. 
  • trunk/src/pyspacewar/ui.py

    r235 r236  
    18521852        self._init_pygame() 
    18531853        self._init_trail_colors() 
     1854        self._load_sounds() 
    18541855        self._load_planet_images() 
    18551856        self._load_background() 
     
    19661967            # of subsequent blits 
    19671968            self.background_surface = scaled.convert() 
     1969 
     1970    def _load_sounds(self): 
     1971        """Load bitmaps of planets.""" 
     1972        self.fire_sound = pygame.mixer.Sound(find('sounds', 
     1973                                                  'Gun_Silencer.wav')) 
    19681974 
    19691975    def _init_fonts(self): 
     
    22452251        if not self.ai_controlled[player_id]: 
    22462252            self.ships[player_id].launch() 
     2253            self.fire_sound.play() 
    22472254 
    22482255    def draw(self):