diff --git a/src/scenes/game.py b/src/scenes/game.py index 177d8b0..f3b7aad 100644 --- a/src/scenes/game.py +++ b/src/scenes/game.py @@ -326,22 +326,6 @@ def __spawn_ellements(world: World): Score(), ) - -def __spawn_bonus(world: World): - bonus = Bonus.aleatoire(world) - world.new_entity().set( - SpriteBundle( - Bonus.get_texture(bonus), - 3, - Vec2( - random.randint(400, render.WIDTH - 400), - random.randint(100, render.HEIGHT - 100), - ), - Vec2(70), - Vec2(0.5), - ), - bonus, - ) world.new_entity().set( SpriteBundle( f"button_menu_icon.png", @@ -362,6 +346,23 @@ def __go_to_menu(world: World, _e: Entity): world[CurrentScene] = menu.MENU +def __spawn_bonus(world: World): + bonus = Bonus.aleatoire(world) + world.new_entity().set( + SpriteBundle( + Bonus.get_texture(bonus), + 3, + Vec2( + random.randint(400, render.WIDTH - 400), + random.randint(100, render.HEIGHT - 100), + ), + Vec2(70), + Vec2(0.5), + ), + bonus, + ) + + def __spawn_ball(world: World): """ Fonction qui fait apparaitre une balle avec une velocitée aleatoire