Changeset 135


Ignore:
Timestamp:
06/14/09 14:08:23 (10 years ago)
Author:
maximinus_parpg
Message:

Added 'm' button to toggle music on/off.
Updated README file.

Location:
trunk/PARPG
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/README

    r63 r135  
     1                                 PARPG README 
     2                          Last Updated 15 June 2009 
    13 
    2 PARPG 
    3  
    4 First of all, you will need the Fife engine to install, see: 
     4Thank you for downloading PARPG. To get it running, you'll need the FIFE 
     5engine on your computer. So start by visiting them at: 
    56 
    67http://fifengine.de/ 
     
    1314 
    1415Keys: 
     16    Q quits without asking. 
     17    ESC shows the main menu. 
     18    I shows/hides inventory. 
     19    F7 takes a screenshot. 
    1520    F5 shows the grid co-ordinates. 
    16     F7 takes a screenshot. 
    1721    T shows the grid layout. 
    18     Q quits. 
    19     I shows/hides inventory. 
     22    M toggles music on and off. 
    2023 
    2124It should be noted that PARPG is in no way a complete game as of yet. 
     
    3639The PARPG team. 
    3740 
    38 Last update: Monday, May 11th 2009 
    39  
  • trunk/PARPG/scripts/sounds.py

    r134 r135  
    2525        # set up the sound 
    2626        self.music = self.sound_engine.createEmitter() 
     27        self.music_on = False 
    2728     
    2829    def playMusic(self, sfile = None): 
     
    3334            self.music.setLooping(True) 
    3435        self.music.play() 
     36        self.music_on = True 
    3537     
    3638    def pauseMusic(self): 
    3739        """Stop current playback""" 
    38         self.music.stop() 
     40        self.music.pause() 
     41        self.music_on = False 
     42 
     43    def toggleMusic(self): 
     44        if(self.music_on == False): 
     45            self.playMusic() 
     46        else: 
     47            self.pauseMusic() 
    3948 
    4049    def setVolume(self, volume): 
  • trunk/PARPG/scripts/world.py

    r134 r135  
    228228            # Escape brings up the main menu 
    229229            self.hud.displayMenu() 
     230        if(keyval == key.M): 
     231            self.sounds.toggleMusic() 
    230232 
    231233    def getCoords(self, click): 
Note: See TracChangeset for help on using the changeset viewer.