Mode menteur #45
BIN
assets/krita/menteur_arrow.kra
Normal file
BIN
assets/krita/menteur_arrow.kra
Normal file
Binary file not shown.
BIN
assets/krita/menteur_button.kra
Normal file
BIN
assets/krita/menteur_button.kra
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/textures/menteur/arrow.png
Normal file
BIN
assets/textures/menteur/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
assets/textures/menteur/arrow_hover.png
Normal file
BIN
assets/textures/menteur/arrow_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
BIN
assets/textures/menteur/play_again.png
Normal file
BIN
assets/textures/menteur/play_again.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
assets/textures/menteur/play_again_hover.png
Normal file
BIN
assets/textures/menteur/play_again_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
assets/textures/menteur/valider.png
Normal file
BIN
assets/textures/menteur/valider.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
assets/textures/menteur/valider_hover.png
Normal file
BIN
assets/textures/menteur/valider_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
Définis la scène du jeu classique, sans variante.
|
||||
Définis la scène du jeu menteur, sans variante.
|
||||
"""
|
||||
|
||||
from random import randint
|
||||
|
@ -52,6 +52,9 @@ class IsRunning:
|
|||
"""
|
||||
|
||||
|
||||
COLOR_TEXT = Color(59, 162, 0)
|
||||
|
||||
|
||||
def __initialize_world(world: World):
|
||||
"""
|
||||
Initialise le monde du menu.
|
||||
|
@ -66,11 +69,11 @@ def __initialize_world(world: World):
|
|||
|
||||
# Bouton valider/rejouer
|
||||
world.create_entity(
|
||||
Position(Display.WIDTH / 2, 900),
|
||||
Position(Display.WIDTH / 2, 880),
|
||||
Order(1),
|
||||
Centered(),
|
||||
Texture("classique/valider.png"),
|
||||
HoveredTexture("classique/valider_hover.png"),
|
||||
Texture("menteur/valider.png"),
|
||||
HoveredTexture("menteur/valider_hover.png"),
|
||||
Clickable(lambda world, _: _update(world)),
|
||||
)
|
||||
|
||||
|
@ -81,7 +84,7 @@ def __initialize_world(world: World):
|
|||
Centered(),
|
||||
typing.Typing("1234567890"),
|
||||
Text(""),
|
||||
Color(61, 22, 58),
|
||||
COLOR_TEXT,
|
||||
TextSize(150),
|
||||
)
|
||||
|
||||
|
@ -92,17 +95,17 @@ def __initialize_world(world: World):
|
|||
Centered(),
|
||||
TextDialogue(),
|
||||
TextSize(150),
|
||||
Color(61, 22, 58),
|
||||
COLOR_TEXT,
|
||||
Text("Devine le nombre..."),
|
||||
)
|
||||
|
||||
# Text qui affiche le nombre d'essai
|
||||
world.create_entity(
|
||||
Position(Display.WIDTH - 700, 100),
|
||||
Position(Display.WIDTH - 750, 120),
|
||||
Order(4),
|
||||
TextSize(100),
|
||||
NombreEssaiText(),
|
||||
Color(61, 22, 58),
|
||||
COLOR_TEXT,
|
||||
Text("il reste : 15 essais"),
|
||||
)
|
||||
|
||||
|
@ -110,9 +113,9 @@ def __initialize_world(world: World):
|
|||
world.create_entity(
|
||||
Order(11),
|
||||
Position(100, 100),
|
||||
Texture("classique/arrow.png"),
|
||||
Texture("menteur/arrow.png"),
|
||||
Clickable(lambda world, _: world[Game].change_scene("menu")),
|
||||
HoveredTexture("classique/arrow_hover.png"),
|
||||
HoveredTexture("menteur/arrow_hover.png"),
|
||||
)
|
||||
|
||||
# Les ressources.
|
||||
|
@ -192,8 +195,8 @@ def end_game(world: World, state: str):
|
|||
|
||||
# on change la texture du button submit.
|
||||
for entity in world.query(Clickable, Centered):
|
||||
entity[Texture] = Texture("classique/play_again.png")
|
||||
entity[HoveredTexture] = HoveredTexture("classique/play_again_hover.png")
|
||||
entity[Texture] = Texture("menteur/play_again.png")
|
||||
entity[HoveredTexture] = HoveredTexture("menteur/play_again_hover.png")
|
||||
|
||||
|
||||
def _check_return(world: World):
|
||||
|
|
Loading…
Reference in a new issue