Added the robot with animations to the game. Also made the game pause when using the menu.
This commit is contained in:
@@ -25,8 +25,20 @@ A generic level.
|
||||
"""
|
||||
|
||||
class Level(object):
|
||||
def update(self, e, t, dt):
|
||||
def __init__(self, graphics_dir, paused=False):
|
||||
self.__dict__.update(locals())
|
||||
|
||||
def restart(self):
|
||||
pass
|
||||
|
||||
def update(self, e, t, dt):
|
||||
if not self.paused:
|
||||
for obj in self.objects:
|
||||
obj.update(e, t, dt)
|
||||
|
||||
def draw(self, window):
|
||||
pass
|
||||
for tile in self.tiles:
|
||||
tile.draw(window)
|
||||
|
||||
for obj in sorted(self.objects, key=lambda obj: (obj.y + obj.z)):
|
||||
obj.draw(window)
|
||||
|
||||
Reference in New Issue
Block a user