diff --git a/src/scenes/send_to_server.py b/src/scenes/send_to_server.py index 483ba16..88f28e4 100644 --- a/src/scenes/send_to_server.py +++ b/src/scenes/send_to_server.py @@ -7,7 +7,6 @@ from plugins.click import Clickable from plugins.hover import HoveredTexture from plugins.inputs import Held, Pressed from plugins.render import SpriteBundle, Text, TextBundle -from plugins.timing import TimedEvent from plugins.writing import Writing import requests as rq from scenes import game, thanks @@ -22,12 +21,7 @@ def new_score(world: World, e: Entity): try: post = {"name": name[Text], "score": world[game.Player1Score]} rq.post(f"https://{IP}/new_score", post) - world.new_entity().set( - TimedEvent( - 1, - lambda world, entity: world.set(CurrentScene(thanks.THANKS)), - ) - ) + world.set(CurrentScene(thanks.THANKS)) except Exception as error: print("Error with the serveur:", error) diff --git a/src/scenes/thanks.py b/src/scenes/thanks.py index 756b5b2..52fdc10 100644 --- a/src/scenes/thanks.py +++ b/src/scenes/thanks.py @@ -17,7 +17,7 @@ def __spawn_elements(world: World): position=Vec2(render.WIDTH / 2, render.HEIGHT / 2 - 75), origin=Vec2(0.5), ), - TimedEvent(3, lambda world, entity: world.set(CurrentScene(menu.MENU))), + TimedEvent(1.5, lambda world, entity: world.set(CurrentScene(menu.MENU))), ) world.new_entity().set( TextBundle(