fix: Door sprite is facing right direction

- Moved doors closer to center
This commit is contained in:
Alexey 2026-03-18 13:38:56 +03:00
commit 3dde5a729e

View file

@ -135,7 +135,11 @@ fn door_bundle(image: Handle<Image>, position: Vec2, facing_left: bool) -> impl
Transform::from_xyz(0., 0., 0.),
),
(
Sprite::from_image(image),
Sprite {
image,
flip_x: facing_left,
..default()
},
Transform::from_xyz(0., 0., 0.),
),
],
@ -156,8 +160,8 @@ pub fn setup_world(
asset_server: Res<AssetServer>,
) {
let door_image = asset_server.load(DOOR_CLOSED_ASSET);
commands.spawn(door_bundle(door_image.clone(), vec2(128., 0.), true));
commands.spawn(door_bundle(door_image.clone(), vec2(160., 0.), false));
commands.spawn(door_bundle(door_image.clone(), vec2(196., 0.), false)).insert(Locked);
commands.spawn(wall_bundle(vec2(-128., 0.)));
commands.spawn(door_bundle(door_image.clone(), vec2(16., 0.), true));
commands.spawn(door_bundle(door_image.clone(), vec2(48., 0.), false));
commands.spawn(door_bundle(door_image.clone(), vec2(80., 0.), false)).insert(Locked);
commands.spawn(wall_bundle(vec2(-16., 0.)));
}