Added __str__ method

This commit is contained in:
Marcin Kostrzewski 2020-05-16 09:59:53 +02:00
parent 90746c51d9
commit fa1fe48abb

View File

@ -247,3 +247,6 @@ class Entity(pygame.sprite.Sprite):
self.movementTimer += self.pygameTimer.tick()
# If A* has ben called, move the entity
self.updateEntityCoords()
def __str__(self):
return "Entity - ID:{}, pos:({}x, {}y)".format(self.id, self.x, self.y)