Added the robot with animations to the game. Also made the game pause when using the menu.

This commit is contained in:
Sakse Dalum
2012-08-08 13:26:55 +02:00
parent 28a19d5493
commit ea181b40c0
9 changed files with 92 additions and 32 deletions

View File

@@ -34,7 +34,8 @@ import game_menu
class Game(object):
"""Create an object to handle the game."""
def __init__(self, window, disable_music, running=False, speed=30):
def __init__(self, window, directory, disable_music,
running=False, speed=30):
self.__dict__.update(locals())
self.objs = []
@@ -53,12 +54,12 @@ class Game(object):
self.running = False
def load(self):
graphics_dir = os.path.abspath(os.path.join("resources", "graphics"))
graphics_dir = os.path.join(self.directory, "resources", "graphics")
self.objs.append(main_menu.MainMenu(self, graphics_dir))
self.level = None
self.jukebox = jukebox.Jukebox(
os.path.abspath(os.path.join("resources", "music")),
os.path.join(self.directory, "resources", "music"),
["basshit.ogg"])
self.jukebox.stop()
if not self.disable_music: