ecs #58
|
@ -13,7 +13,6 @@ from plugins import render
|
||||||
from plugins import writing
|
from plugins import writing
|
||||||
from plugins.assets import Assets
|
from plugins.assets import Assets
|
||||||
from plugins.hover import HoveredTexture
|
from plugins.hover import HoveredTexture
|
||||||
from plugins.inputs import Pressed
|
|
||||||
from plugins.render import Sprite
|
from plugins.render import Sprite
|
||||||
from plugins.text import Text
|
from plugins.text import Text
|
||||||
from plugins.writing import Writing
|
from plugins.writing import Writing
|
||||||
|
@ -70,7 +69,6 @@ class PlayAgain:
|
||||||
def __initialize_world(world: World):
|
def __initialize_world(world: World):
|
||||||
world.set(Number(random.randint(0, 99)))
|
world.set(Number(random.randint(0, 99)))
|
||||||
world.set(IsRunning())
|
world.set(IsRunning())
|
||||||
print(world[Number])
|
|
||||||
|
|
||||||
world.new_entity().set(Sprite(world[Assets].get_texture("background")))
|
world.new_entity().set(Sprite(world[Assets].get_texture("background")))
|
||||||
world.new_entity().set(
|
world.new_entity().set(
|
||||||
|
@ -162,8 +160,6 @@ def __update(world: World):
|
||||||
else:
|
else:
|
||||||
lying = False
|
lying = False
|
||||||
|
|
||||||
print(lying)
|
|
||||||
|
|
||||||
# Si le jeu est fini
|
# Si le jeu est fini
|
||||||
if IsRunning not in world:
|
if IsRunning not in world:
|
||||||
# On relance la scene/jeu
|
# On relance la scene/jeu
|
||||||
|
@ -238,7 +234,7 @@ def __update(world: World):
|
||||||
__SCENE = (
|
__SCENE = (
|
||||||
Scene(
|
Scene(
|
||||||
[__initialize_world],
|
[__initialize_world],
|
||||||
[__detect_keys],
|
[],
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
+ writing.PLUGIN
|
+ writing.PLUGIN
|
||||||
|
|
|
@ -3,7 +3,7 @@ La scène du menu principal du jeu.
|
||||||
|
|
||||||
Dans cette scène nous pouvons choisir le mode de jeu.
|
Dans cette scène nous pouvons choisir le mode de jeu.
|
||||||
"""
|
"""
|
||||||
from scenes import basic_game
|
import basic_game
|
||||||
from engine import CurrentScene, Scene
|
from engine import CurrentScene, Scene
|
||||||
from engine.ecs import Entity, World
|
from engine.ecs import Entity, World
|
||||||
from engine.math import Vec2
|
from engine.math import Vec2
|
||||||
|
@ -34,7 +34,7 @@ def __create_button(world: World, assets: Assets, i: int, name: str):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def __on_click_butons(world: World, entity: Entity, name: str):
|
def __on_click_butons(world: World, _entity: Entity, name: str):
|
||||||
"""
|
"""
|
||||||
Fonction qui s'execute quand on clique sur un bouton.
|
Fonction qui s'execute quand on clique sur un bouton.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue