refont du jeu classique #42
|
@ -21,6 +21,8 @@ from engine import (
|
||||||
World,
|
World,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
COLOR_TEXT = Color(66, 39, 148)
|
||||||
|
|
||||||
|
|
||||||
class RandomNumber(int):
|
class RandomNumber(int):
|
||||||
"""
|
"""
|
||||||
|
@ -66,7 +68,7 @@ def __initialize_world(world: World):
|
||||||
|
|
||||||
# Bouton valider/rejouer
|
# Bouton valider/rejouer
|
||||||
world.create_entity(
|
world.create_entity(
|
||||||
Position(Display.WIDTH / 2, 900),
|
Position(Display.WIDTH / 2, 875),
|
||||||
Order(1),
|
Order(1),
|
||||||
Centered(),
|
Centered(),
|
||||||
Texture("classique/valider.png"),
|
Texture("classique/valider.png"),
|
||||||
|
@ -81,7 +83,7 @@ def __initialize_world(world: World):
|
||||||
Centered(),
|
Centered(),
|
||||||
typing.Typing("1234567890"),
|
typing.Typing("1234567890"),
|
||||||
Text(""),
|
Text(""),
|
||||||
Color(61, 22, 58),
|
COLOR_TEXT,
|
||||||
TextSize(150),
|
TextSize(150),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -92,24 +94,24 @@ def __initialize_world(world: World):
|
||||||
Centered(),
|
Centered(),
|
||||||
TextDialogue(),
|
TextDialogue(),
|
||||||
TextSize(150),
|
TextSize(150),
|
||||||
Color(61, 22, 58),
|
COLOR_TEXT,
|
||||||
Text("Devine le nombre..."),
|
Text("Devine le nombre..."),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Text qui affiche le nombre d'essai
|
# Text qui affiche le nombre d'essai
|
||||||
world.create_entity(
|
world.create_entity(
|
||||||
Position(Display.WIDTH - 700, 100),
|
Position(Display.WIDTH / 2 - 100, 150),
|
||||||
Order(4),
|
Order(4),
|
||||||
TextSize(100),
|
TextSize(100),
|
||||||
NombreEssaiText(),
|
NombreEssaiText(),
|
||||||
Color(61, 22, 58),
|
COLOR_TEXT,
|
||||||
Text("il reste : 7 essais"),
|
Text("il reste : 7 essais"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Bouton pour revenir au menu
|
# Bouton pour revenir au menu
|
||||||
world.create_entity(
|
world.create_entity(
|
||||||
Order(11),
|
Order(11),
|
||||||
Position(100, 100),
|
Position(150, 150),
|
||||||
Texture("classique/arrow.png"),
|
Texture("classique/arrow.png"),
|
||||||
Clickable(lambda world, _: world[Game].change_scene("menu")),
|
Clickable(lambda world, _: world[Game].change_scene("menu")),
|
||||||
HoveredTexture("classique/arrow_hover.png"),
|
HoveredTexture("classique/arrow_hover.png"),
|
||||||
|
|
Loading…
Reference in a new issue