Added tiles.
This commit is contained in:
@@ -28,7 +28,8 @@ class WorldObject(object):
|
||||
def __init__(self, x, y, speed=5, tile_x=64, tile_y=48):
|
||||
self.__dict__.update(locals())
|
||||
|
||||
self.move_x, self.move_y = self.x, self.y
|
||||
self.move_x = self.x = self.x - (self.x % self.tile_x)
|
||||
self.move_y = self.y = self.y - (self.y % self.tile_y)
|
||||
|
||||
def move(self, move_x, move_y):
|
||||
if self.move_x == self.x and self.move_y == self.y:
|
||||
|
||||
Reference in New Issue
Block a user