cleanup. removeobject.move() method and attriutes dx, dy
This commit is contained in:
parent
dd81190a4e
commit
e395dc39bb
1 changed files with 0 additions and 6 deletions
|
@ -39,8 +39,6 @@ class Object(pygame.sprite.Sprite):
|
||||||
self.image = None
|
self.image = None
|
||||||
self.load()
|
self.load()
|
||||||
self.rect = self.image.get_rect().move(pos)
|
self.rect = self.image.get_rect().move(pos)
|
||||||
self.dx = 0
|
|
||||||
self.dy = 0
|
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
""" load sprite list """
|
""" load sprite list """
|
||||||
|
@ -52,10 +50,6 @@ class Object(pygame.sprite.Sprite):
|
||||||
index += 1
|
index += 1
|
||||||
self.image = self.frames[0]
|
self.image = self.frames[0]
|
||||||
|
|
||||||
def move(self, dx, dy):
|
|
||||||
""" move the object by adding deltas passed """
|
|
||||||
self.speed = (dx, dy)
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
self.rect.move_ip(self.speed)
|
self.rect.move_ip(self.speed)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue