Skip to content

Commit 9a12762

Browse files
committed
fix: taille de l'effet
1 parent 4a16cb1 commit 9a12762

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

game/components/player.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def _load_effect_sprites(self) -> Dict[str, List[pygame.Surface]]:
8989
pygame.transform.scale(
9090
pygame.image.load(f"assets/sprites/electric/{i}.png"),
9191
(
92-
self.game.settings.TILE_SIZE * 2,
93-
self.game.settings.TILE_SIZE * 2,
92+
self.game.settings.TILE_SIZE * 3,
93+
self.game.settings.TILE_SIZE * 3,
9494
),
9595
).convert_alpha()
9696
for i in range(1, 9)
@@ -195,7 +195,6 @@ def move(self) -> None:
195195
et gère les collisions avec les bords de l'écran
196196
"""
197197
movement = pygame.math.Vector2()
198-
199198
if self.direction == Direction.UP:
200199
movement.y = -self.speed
201200
elif self.direction == Direction.DOWN:
@@ -300,8 +299,8 @@ def draw(self, screen: pygame.Surface) -> None:
300299
int(self.current_effect_index)
301300
],
302301
(
303-
self.position.x - self.game.settings.TILE_SIZE // 2,
304-
self.position.y - self.game.settings.TILE_SIZE,
302+
self.position.x - self.game.settings.TILE_SIZE * 1.5 // 2,
303+
self.position.y - self.game.settings.TILE_SIZE * 1.5,
305304
),
306305
)
307306
self.current_effect_index = (

0 commit comments

Comments
 (0)