Mode menteur #45
|
@ -4,13 +4,14 @@ Example de l'utilisation du moteur de jeu.
|
||||||
|
|
||||||
|
|
||||||
from engine import start_game
|
from engine import start_game
|
||||||
from scenes import classique, menu
|
from scenes import classique, menteur, menu
|
||||||
|
|
||||||
|
|
||||||
start_game(
|
start_game(
|
||||||
{
|
{
|
||||||
"menu": menu.SCENE,
|
"menu": menu.SCENE,
|
||||||
"classique": classique.SCENE
|
"classique": classique.SCENE,
|
||||||
|
"menteur": menteur.SCENE
|
||||||
},
|
},
|
||||||
"menu",
|
"menu",
|
||||||
title="Guess The Number",
|
title="Guess The Number",
|
||||||
|
|
|
@ -103,7 +103,7 @@ def __initialize_world(world: World):
|
||||||
TextSize(100),
|
TextSize(100),
|
||||||
NombreEssaiText(),
|
NombreEssaiText(),
|
||||||
Color(61, 22, 58),
|
Color(61, 22, 58),
|
||||||
Text("il reste : 7 essais"),
|
Text("il reste : 15 essais"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Bouton pour revenir au menu
|
# Bouton pour revenir au menu
|
||||||
|
@ -116,8 +116,8 @@ def __initialize_world(world: World):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Les ressources.
|
# Les ressources.
|
||||||
world[NombreEssai] = NombreEssai(7)
|
world[NombreEssai] = NombreEssai(15)
|
||||||
world[RandomNumber] = RandomNumber(random.randint(0, 99))
|
world[RandomNumber] = RandomNumber(randint(0, 99))
|
||||||
world[IsRunning] = IsRunning()
|
world[IsRunning] = IsRunning()
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ def _update(world: World):
|
||||||
# si le jeu s'est arrete.
|
# si le jeu s'est arrete.
|
||||||
if IsRunning not in world:
|
if IsRunning not in world:
|
||||||
# on relance le jeu.
|
# on relance le jeu.
|
||||||
world[Game].change_scene("classique")
|
world[Game].change_scene("menteur")
|
||||||
|
|
||||||
for entity in world.query(typing.Typing, Text):
|
for entity in world.query(typing.Typing, Text):
|
||||||
# One efface le nombre.
|
# One efface le nombre.
|
||||||
|
|
Loading…
Reference in a new issue