Correction de la velocitée d'apparition de la balle (#41)
Reviewed-on: #41
This commit is contained in:
parent
3631f2dd3b
commit
eee7dfd256
|
@ -368,7 +368,7 @@ def __spawn_ball(world: World):
|
||||||
Fonction qui fait apparaitre une balle avec une velocitée aleatoire
|
Fonction qui fait apparaitre une balle avec une velocitée aleatoire
|
||||||
"""
|
"""
|
||||||
# random velocité
|
# random velocité
|
||||||
velocity = Vec2(2 * random.randint(100, 200), random.randint(100, 200))
|
velocity = Vec2(2 * random.randint(100, 200), random.randint(-200, 200))
|
||||||
|
|
||||||
# mouvement a droite ou a gauche
|
# mouvement a droite ou a gauche
|
||||||
if random.randint(0, 1) == 0:
|
if random.randint(0, 1) == 0:
|
||||||
|
@ -481,6 +481,7 @@ def __bounce_on_left_wall(a: Entity, b: Entity):
|
||||||
world[Player2Score] += 1
|
world[Player2Score] += 1
|
||||||
__update_scores(world, b)
|
__update_scores(world, b)
|
||||||
else:
|
else:
|
||||||
|
world.query(Clickable).pop().destroy()
|
||||||
world[CurrentScene] = game_over.GAME_OVER
|
world[CurrentScene] = game_over.GAME_OVER
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue