Added tiles.

This commit is contained in:
Sakse Dalum
2012-08-07 21:23:10 +02:00
parent dc5acdf4c6
commit 90a11e9ed3
9 changed files with 83 additions and 9 deletions

View File

@@ -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