2023-12-28 18:34:38 +00:00
|
|
|
"""
|
|
|
|
Module d'exemple de l'utilisation du moteur de jeu.
|
|
|
|
"""
|
|
|
|
|
2024-01-03 02:14:53 +00:00
|
|
|
from engine import Scene, start_game
|
|
|
|
from engine.ecs import World
|
2023-12-28 18:34:38 +00:00
|
|
|
from plugins import defaults
|
2024-01-03 02:14:53 +00:00
|
|
|
from plugins.render import Origin, Position, Scale, Texture
|
2023-12-28 18:34:38 +00:00
|
|
|
|
|
|
|
|
2024-01-03 02:14:53 +00:00
|
|
|
def __initialize(world: World):
|
|
|
|
"""
|
|
|
|
Initialise les ressources pour le moteur de jeu.
|
|
|
|
"""
|
|
|
|
world.new_entity().set(
|
|
|
|
Texture("background.png", 0),
|
|
|
|
# Scale(1000, 1000),
|
|
|
|
# Origin(0.5, 0.5),
|
|
|
|
# Position(600, 600),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
MENU = Scene(
|
|
|
|
[__initialize],
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
start_game(defaults.PLUGIN, MENU)
|