Gameplay de la recherche dans les dossiers #44
|
@ -118,6 +118,8 @@ def __change_folders_speeds(world: World, _e: Entity):
|
||||||
"""
|
"""
|
||||||
for entity in world.query(DirectoryPosition, smooth.Speed):
|
for entity in world.query(DirectoryPosition, smooth.Speed):
|
||||||
entity[smooth.Speed] = smooth.Speed(random.uniform(2.0, 2.5))
|
entity[smooth.Speed] = smooth.Speed(random.uniform(2.0, 2.5))
|
||||||
|
for entity in world.query(TextSize):
|
||||||
|
entity[TextSize] = TextSize(40)
|
||||||
|
|
||||||
|
|
||||||
def __remove_folders_speeds(world: World):
|
def __remove_folders_speeds(world: World):
|
||||||
|
@ -163,21 +165,21 @@ def __initialize_world(world: World):
|
||||||
]
|
]
|
||||||
|
|
||||||
positions = [
|
positions = [
|
||||||
Position(0, 0),
|
Position(40 + (7 * 180) + 48, 35 + (5 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (5 * 180) + 48, 35 + (5 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (4 * 180) + 48, 35 + (4 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (3 * 180) + 48, 35 + (5 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (1 * 180) + 48, 35 + (5 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (6 * 180) + 48, 35 + (2 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (5 * 180) + 48, 35 + (3 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (4 * 180) + 48, 35 + (2 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (2 * 180) + 48, 35 + (4 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (1 * 180) + 48, 35 + (2 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (7 * 180) + 48, 35 + (1 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (5 * 180) + 48, 35 + (1 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (3 * 180) + 48, 35 + (0 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (2 * 180) + 48, 35 + (1 * 166) + 38),
|
||||||
Position(0, 0),
|
Position(40 + (0 * 180) + 48, 35 + (1 * 166) + 38),
|
||||||
]
|
]
|
||||||
|
|
||||||
for y in range(LINES):
|
for y in range(LINES):
|
||||||
|
@ -201,7 +203,7 @@ def __initialize_world(world: World):
|
||||||
Order(1),
|
Order(1),
|
||||||
Centered(),
|
Centered(),
|
||||||
Text(names.pop()),
|
Text(names.pop()),
|
||||||
TextSize(25),
|
TextSize(0),
|
||||||
DirectoryName(entity),
|
DirectoryName(entity),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -261,6 +263,8 @@ def __move_directories(world: World):
|
||||||
# On met à jour la séléction
|
# On met à jour la séléction
|
||||||
mouse = world[Mouse]
|
mouse = world[Mouse]
|
||||||
for entity in world.query(Hovered, DirectoryPosition):
|
for entity in world.query(Hovered, DirectoryPosition):
|
||||||
|
if Animation in entity:
|
||||||
|
continue
|
||||||
if mouse.is_button_pressed(1):
|
if mouse.is_button_pressed(1):
|
||||||
world[SelectedDirectory] = SelectedDirectory(entity, Vec2(mouse.position))
|
world[SelectedDirectory] = SelectedDirectory(entity, Vec2(mouse.position))
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue