Implemented getFacingCoord method
This commit is contained in:
parent
2af94a27e9
commit
a45befd4fa
@ -28,8 +28,13 @@ class Player(Entity):
|
|||||||
|
|
||||||
def getFacingCoord(self):
|
def getFacingCoord(self):
|
||||||
if self.rotation == Rotations.NORTH:
|
if self.rotation == Rotations.NORTH:
|
||||||
return (0, -1)
|
return self.rect.x, self.rect.y - (self.rect.h)
|
||||||
elif self.rotation == Rotations.SOUTH:
|
elif self.rotation == Rotations.SOUTH:
|
||||||
|
return self.rect.x, self.rect.y + (self.rect.h)
|
||||||
|
elif self.rotation == Rotations.EAST:
|
||||||
|
return self.rect.x + (self.rect.h), self.rect.y
|
||||||
|
elif self.rotation == Rotations.WEST:
|
||||||
|
return self.rect.x - (self.rect.h), self.rect.y
|
||||||
|
|
||||||
# Returns given statistic
|
# Returns given statistic
|
||||||
def getStatistic(self, stat):
|
def getStatistic(self, stat):
|
||||||
|
Loading…
Reference in New Issue
Block a user