diff options
| author | Moisis <moisis.george@yahoo.com> | 2023-05-17 14:04:38 +0300 |
|---|---|---|
| committer | Moisis <moisis.george@yahoo.com> | 2023-05-17 14:04:38 +0300 |
| commit | 3d7e3d1eba26cc57b31337b0708fce3747f8a988 (patch) | |
| tree | e9f47e18b3a6365ca383a6da0cbbc424e8b6d3fd /src/clyde.py | |
| parent | 8eeb31dba61e8c9b29704c5988f95dcba4338fca (diff) | |
| download | Macpan-3d7e3d1eba26cc57b31337b0708fce3747f8a988.tar.xz Macpan-3d7e3d1eba26cc57b31337b0708fce3747f8a988.zip | |
Improved GUI
Settings added (Debug , Sound)
SoundSystem added (Become sometimes laggy)
Diffstat (limited to 'src/clyde.py')
| -rw-r--r-- | src/clyde.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/clyde.py b/src/clyde.py index 2fd4aee..acb9f42 100644 --- a/src/clyde.py +++ b/src/clyde.py @@ -8,8 +8,8 @@ import math class Clyde(Ghost): - def __init__(self, sprite_sheet, x, y): - super().__init__(sprite_sheet, "cyan", x, y) + def __init__(self, sprite_sheet, x, y,settings): + super().__init__(sprite_sheet, "cyan", x, y,settings) def is_eight_tiles_away(self, pacman): tile_width = 30 @@ -49,7 +49,7 @@ class Clyde(Ghost): if game_state.pacman.powerup is False and self.mode == MODE.FRIGHETENED: self.mode = MODE.CHASING - if settings.debug: + if self.settings.debug: pygame.draw.line(screen, self.color, (game_state.pacman.x, game_state.pacman.y), (self.x, self.y), 1) @@ -68,13 +68,13 @@ class Clyde(Ghost): if self.is_eight_tiles_away(game_state.pacman): ret[i] = self.heuristic( (nx, ny), bottom_left_corner[0], bottom_left_corner[1]) - if settings.debug: + if self.settings.debug: pygame.draw.line(screen, self.color, (bottom_left_corner), (self.x, self.y), 1) else: ret[i] = self.heuristic( (nx, ny), game_state.pacman.x, game_state.pacman.y) - if settings.debug: + if self.settings.debug: pygame.draw.line(screen, self.color, (game_state.pacman.x, game_state.pacman.y), (self.x, self.y), 1) elif self.mode == MODE.EATEN: |
