ecs #58
31
src/plugins/display.py
Normal file
31
src/plugins/display.py
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
"""
|
||||||
|
Un plugin pour la gestion de la fenetre du jeu.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import pygame
|
||||||
|
from ecs import World
|
||||||
|
from engine import GlobalScene
|
||||||
|
|
||||||
|
|
||||||
|
def __initialize(_world: World):
|
||||||
|
"""
|
||||||
|
Initialise pygame et les ressources pour la gestion de la fenetre.
|
||||||
|
"""
|
||||||
|
pygame.init()
|
||||||
|
pygame.display.set_mode((800, 600), pygame.RESIZABLE)
|
||||||
|
|
||||||
|
|
||||||
|
def __terminate(_world: World):
|
||||||
|
"""
|
||||||
|
Arrête pygame.
|
||||||
|
"""
|
||||||
|
pygame.quit()
|
||||||
|
|
||||||
|
|
||||||
|
PLUGIN = GlobalScene(
|
||||||
|
[__initialize],
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
[__terminate],
|
||||||
|
)
|
Loading…
Reference in a new issue