fix music autoplay
This commit is contained in:
parent
2ab8fb8026
commit
1f4f352453
1 changed files with 6 additions and 2 deletions
8
r3.py
8
r3.py
|
@ -28,8 +28,8 @@ BLACK = (0, 0, 0)
|
||||||
#pygame.mixer.music.load('music/galaxy.opus')
|
#pygame.mixer.music.load('music/galaxy.opus')
|
||||||
csfx = pygame.mixer.Sound('sfx/crash.ogg')
|
csfx = pygame.mixer.Sound('sfx/crash.ogg')
|
||||||
lcfx = pygame.mixer.Sound('sfx/complete.ogg')
|
lcfx = pygame.mixer.Sound('sfx/complete.ogg')
|
||||||
if music:
|
#if music:
|
||||||
pygame.mixer.music.play(-1)
|
# pygame.mixer.music.play(-1)
|
||||||
#sound = pygame.mixer.Sound(file='bmx.ogg')
|
#sound = pygame.mixer.Sound(file='bmx.ogg')
|
||||||
#raw_array = sound.get_raw()
|
#raw_array = sound.get_raw()
|
||||||
#raw_array = raw_array[100000:92557920]
|
#raw_array = raw_array[100000:92557920]
|
||||||
|
@ -278,6 +278,8 @@ else:
|
||||||
wall4 = Wallv(-200,800)
|
wall4 = Wallv(-200,800)
|
||||||
#crash = Crash()
|
#crash = Crash()
|
||||||
#antenna = Antenna()
|
#antenna = Antenna()
|
||||||
|
if music:
|
||||||
|
pygame.mixer.music.play(-1)
|
||||||
running = True
|
running = True
|
||||||
live = True
|
live = True
|
||||||
complete = False
|
complete = False
|
||||||
|
@ -364,6 +366,8 @@ while running:
|
||||||
wall2 = Wallh(2150,-200)
|
wall2 = Wallh(2150,-200)
|
||||||
wall3 = Wallv(-200,-200)
|
wall3 = Wallv(-200,-200)
|
||||||
wall4 = Wallv(-200,800)
|
wall4 = Wallv(-200,800)
|
||||||
|
if music:
|
||||||
|
pygame.mixer.music.play(-1)
|
||||||
live = True
|
live = True
|
||||||
complete = False
|
complete = False
|
||||||
if music:
|
if music:
|
||||||
|
|
Loading…
Reference in a new issue