This commit is contained in:
chrys 2016-03-21 00:33:00 +01:00
parent 024e764511
commit e6adafa5fc

View File

@ -17,7 +17,7 @@ def initialize_gui(gameTitle):
pygame.display.set_mode((320, 200)) pygame.display.set_mode((320, 200))
pygame.display.set_caption(gameTitle) pygame.display.set_caption(gameTitle)
# Load sounds from the sound directory and creates a list like that {'bottle': 'bottle.ogg'} # Load sounds from the sound directory and creates a list like that {'bottle': 'bottle.ogg'}
soundFiles = [f for f in listdir(SoundFolder) if isfile(join(SoundFolder, f)) and (f.split('.')[1].lower() == "ogg")] soundFiles = [f for f in listdir(SoundFolder) if isfile(join(SoundFolder, f)) and (f.split('.')[1].lower() in ["ogg","wav"])]
#lets make a dict with pygame.mixer.Sound() objects {'bottle':<soundobject>} #lets make a dict with pygame.mixer.Sound() objects {'bottle':<soundobject>}
soundData = {} soundData = {}
for f in soundFiles: for f in soundFiles: