add wave
This commit is contained in:
parent
024e764511
commit
e6adafa5fc
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user