Fixing item pickup action after completing the movement
This commit is contained in:
parent
a51661ae6e
commit
effa48d7c3
@ -156,9 +156,11 @@ class Entity(pygame.sprite.Sprite):
|
|||||||
if self.move(nextMove):
|
if self.move(nextMove):
|
||||||
self.movesList.remove(nextMove)
|
self.movesList.remove(nextMove)
|
||||||
if not self.movesList:
|
if not self.movesList:
|
||||||
# if self.canPickup:
|
# Attempt to interact with the target.
|
||||||
# self.pickUp()
|
try:
|
||||||
# self.canPickup = False
|
self.movementTarget.on_interaction(self)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
self.movementTarget = None
|
self.movementTarget = None
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user