Added tiles.
This commit is contained in:
@@ -34,7 +34,7 @@ import game_menu
|
||||
|
||||
class Game(object):
|
||||
"""Create an object to handle the game."""
|
||||
def __init__(self, window, running=False, speed=30):
|
||||
def __init__(self, window, disable_music, running=False, speed=30):
|
||||
self.__dict__.update(locals())
|
||||
|
||||
self.objs = []
|
||||
@@ -61,7 +61,8 @@ class Game(object):
|
||||
os.path.abspath(os.path.join("resources", "music")),
|
||||
["basshit.ogg"])
|
||||
self.jukebox.stop()
|
||||
self.jukebox.play()
|
||||
if not self.disable_music:
|
||||
self.jukebox.play()
|
||||
|
||||
def run(self):
|
||||
t = pygame.time.get_ticks()
|
||||
@@ -92,7 +93,7 @@ class Game(object):
|
||||
self.stop()
|
||||
|
||||
# Keep the music playing!
|
||||
if not pygame.mixer.music.get_busy():
|
||||
if not pygame.mixer.music.get_busy() and not self.disable_music:
|
||||
self.jukebox.play()
|
||||
|
||||
# Update all objects
|
||||
|
||||
Reference in New Issue
Block a user