Browse Source

Fixed blit_area bug.

master
Niels Serup 9 years ago
parent
commit
5235112424
  1. 3
      robotgame/block.py
  2. 3
      robotgame/worldobject.py

3
robotgame/block.py

@ -36,7 +36,8 @@ class Block(worldobject.WorldObject):
width=1, height=1, blit_area=None):
self.__dict__.update(locals())
worldobject.WorldObject.__init__(self, level, x, y,
movable=movable, visible=visible)
movable=movable, visible=visible,
blit_area=blit_area)
for i in range(width):
for j in range(height):

3
robotgame/worldobject.py

@ -31,7 +31,8 @@ import copy
class WorldObject(object):
def __init__(self, level, x, y, z=0, direction=(1, 0), speed=4,
tile_x=64, tile_y=48,
movable=False, blocking=True, is_moving=False, visible=True):
movable=False, blocking=True, is_moving=False, visible=True,
blit_area=None):
self.__dict__.update(locals())
self.init_x = self.move_x = self.x = x - (x % self.tile_x)

Loading…
Cancel
Save