Latest code. Still not working.

This commit is contained in:
Storm dragon
2016-03-21 06:34:25 -04:00
parent acf8d58bfa
commit f8597666fa
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ def initialize_gui(gameTitle):
pygame.display.set_mode((320, 200))
pygame.display.set_caption(gameTitle)
# 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() in ["ogg","wav"])]
soundFiles = [f for f in listdir("sounds/") if isfile(join("sounds/", f)) and (f.split('.')[1].lower() in ["ogg","wav"])]
#lets make a dict with pygame.mixer.Sound() objects {'bottle':<soundobject>}
soundData = {}
for f in soundFiles:
soundData[f.split('.')[0]] = pygame.mixer.Sound(SoundFolder + "/" + f)
soundData[f.split('.')[0]] = pygame.mixer.Sound("sounds/" + f)