cleanup. removeobject.move() method and attriutes dx, dy

This commit is contained in:
kleph 2009-08-17 01:17:19 +02:00
parent dd81190a4e
commit e395dc39bb

View file

@ -39,8 +39,6 @@ class Object(pygame.sprite.Sprite):
self.image = None
self.load()
self.rect = self.image.get_rect().move(pos)
self.dx = 0
self.dy = 0
def load(self):
""" load sprite list """
@ -52,10 +50,6 @@ class Object(pygame.sprite.Sprite):
index += 1
self.image = self.frames[0]
def move(self, dx, dy):
""" move the object by adding deltas passed """
self.speed = (dx, dy)
def update(self):
self.rect.move_ip(self.speed)