ecs #58
|
@ -21,42 +21,6 @@ LINES = 3
|
|||
COLUMNS = 5
|
||||
SPACING = 200
|
||||
|
||||
NAMES = [
|
||||
"Classique",
|
||||
"Menteur",
|
||||
"Tricheur",
|
||||
"Histoire",
|
||||
"Je t'aime",
|
||||
"Hello",
|
||||
"Cheval",
|
||||
"Defender",
|
||||
"Dansons",
|
||||
"Secrets",
|
||||
"Edmond",
|
||||
"Mon Amour",
|
||||
"Melatonin",
|
||||
"Films",
|
||||
"Cinéma",
|
||||
]
|
||||
|
||||
POSITIONS = [
|
||||
Vec2(1348, 903),
|
||||
Vec2(988, 903),
|
||||
Vec2(808, 737),
|
||||
Vec2(628, 903),
|
||||
Vec2(268, 903),
|
||||
Vec2(1168, 405),
|
||||
Vec2(988, 571),
|
||||
Vec2(808, 405),
|
||||
Vec2(448, 737),
|
||||
Vec2(268, 405),
|
||||
Vec2(1348, 239),
|
||||
Vec2(988, 239),
|
||||
Vec2(628, 73),
|
||||
Vec2(448, 239),
|
||||
Vec2(88, 239),
|
||||
]
|
||||
|
||||
|
||||
class Directory:
|
||||
"""
|
||||
|
@ -142,6 +106,42 @@ def __initialize(world: World):
|
|||
"""
|
||||
assets = world[Assets]
|
||||
|
||||
# Définition des noms et positions des dossiers
|
||||
names = [
|
||||
"Classique",
|
||||
"Menteur",
|
||||
"Tricheur",
|
||||
"Histoire",
|
||||
"Je t'aime",
|
||||
"Hello",
|
||||
"Cheval",
|
||||
"Defender",
|
||||
"Dansons",
|
||||
"Secrets",
|
||||
"Edmond",
|
||||
"Mon Amour",
|
||||
"Melatonin",
|
||||
"Films",
|
||||
"Cinéma",
|
||||
]
|
||||
positions = [
|
||||
Vec2(1348, 903),
|
||||
Vec2(988, 903),
|
||||
Vec2(808, 737),
|
||||
Vec2(628, 903),
|
||||
Vec2(268, 903),
|
||||
Vec2(1168, 405),
|
||||
Vec2(988, 571),
|
||||
Vec2(808, 405),
|
||||
Vec2(448, 737),
|
||||
Vec2(268, 405),
|
||||
Vec2(1348, 239),
|
||||
Vec2(988, 239),
|
||||
Vec2(628, 73),
|
||||
Vec2(448, 239),
|
||||
Vec2(88, 239),
|
||||
]
|
||||
|
||||
# Ajout du fond
|
||||
world.new_entity().set(Sprite(assets.get_texture("background")))
|
||||
|
||||
|
@ -150,8 +150,8 @@ def __initialize(world: World):
|
|||
for y in range(LINES):
|
||||
for x in range(COLUMNS):
|
||||
# Récupération du nom et de la position
|
||||
position = POSITIONS.pop()
|
||||
name = NAMES.pop()
|
||||
position = positions.pop()
|
||||
name = names.pop()
|
||||
|
||||
# Création de l'entité du dossier
|
||||
entity = world.new_entity()
|
||||
|
|
Loading…
Reference in a new issue