Ajout du titre ScoreBoard #42
|
@ -91,6 +91,19 @@ def __spawn_elements(world: World):
|
|||
Clickable(__go_to_settings),
|
||||
)
|
||||
|
||||
world.new_entity().set(
|
||||
TextBundle(
|
||||
"ScoreBoard",
|
||||
0,
|
||||
75,
|
||||
position=Vec2(
|
||||
render.WIDTH / 2,
|
||||
325,
|
||||
),
|
||||
origin=Vec2(0.5),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def __go_to_settings(world: World, _e: Entity):
|
||||
world[CurrentScene] = settings.SETTINGS
|
||||
|
@ -104,7 +117,7 @@ def __spawn_score(world: World):
|
|||
world.new_entity().set(
|
||||
TextBundle(
|
||||
f"{name}",
|
||||
position=Vec2(render.WIDTH / 2 - 350, 325 + 50 * i),
|
||||
position=Vec2(render.WIDTH / 2 - 300, 400 + 50 * i),
|
||||
origin=Vec2(0),
|
||||
order=1,
|
||||
)
|
||||
|
@ -113,7 +126,7 @@ def __spawn_score(world: World):
|
|||
world.new_entity().set(
|
||||
TextBundle(
|
||||
f"{score}",
|
||||
position=Vec2(render.WIDTH / 2 + 350, 325 + 50 * i),
|
||||
position=Vec2(render.WIDTH / 2 + 300, 400 + 50 * i),
|
||||
origin=Vec2(1, 0),
|
||||
order=1,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue