Added the robot with animations to the game. Also made the game pause when using the menu.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user