Update actors/pacman.py

This commit is contained in:
2025-04-19 10:06:26 +02:00
parent 230a29d6ef
commit d61722c048

View File

@@ -15,6 +15,9 @@ class ActorPacman:
self.animate_speed = 2 self.animate_speed = 2
self.mouth_closing = False self.mouth_closing = False
def update(self):
self.animate()
def animate(self): def animate(self):
if self.mouth_closing: if self.mouth_closing:
self.mouth_angle_deg -= self.animate_speed self.mouth_angle_deg -= self.animate_speed
@@ -54,8 +57,5 @@ class ActorPacman:
angle += math.radians(1) angle += math.radians(1)
pygame.draw.polygon(self.screen, Colors.Yellow.value, points) pygame.draw.polygon(self.screen, Colors.Yellow.value, points)
def move_right(self):
pass
def set_direction(self, dir: PlayerDirection): def set_direction(self, dir: PlayerDirection):
self.direction = dir self.direction = dir