Move the camera with the player
This commit is contained in:
@ -13,6 +13,14 @@ class Player(FightingEntity):
|
||||
current_xp: int = 0
|
||||
max_xp: int = 10
|
||||
|
||||
def move(self, y: int, x: int) -> None:
|
||||
"""
|
||||
When the player moves, move the camera of the map.
|
||||
"""
|
||||
super().move(y, x)
|
||||
self.map.currenty = y
|
||||
self.map.currentx = x
|
||||
|
||||
def move_up(self) -> bool:
|
||||
return self.check_move(self.y - 1, self.x, True)
|
||||
|
||||
|
Reference in New Issue
Block a user