add more to level, fix graphical bugs

This commit is contained in:
TudbuT 2024-11-24 10:05:30 +01:00
parent 9b4729b545
commit 140e7c4c5e
No known key found for this signature in database
GPG key ID: B3CF345217F202D3
4 changed files with 32 additions and 38 deletions

View file

@ -18,7 +18,7 @@ mod animation;
#[derive(Event)]
enum PlayerDeathEvent {
Void,
Spikes,
EggDied,
}
#[derive(Event)]
struct RespawnPointSetEvent;

View file

@ -210,7 +210,7 @@ fn spawn_block(
RigidBody::Dynamic
},
if fixed {
Collider::cuboid(block_size / 2.1 * len as f32, block_size / 2.1)
Collider::cuboid(block_size / 2. * len as f32, block_size / 2.1)
} else {
Collider::ball(block_size / 2.)
},

View file

@ -80,12 +80,6 @@ fn update_parallax(
first_parallax_on_cam + *tile as f32 * parallax_info.size.x,
cam_transform.y,
);
dbg!(
cam_transform,
position_on_parallax,
first_parallax_on_cam,
position
);
transform.translation =
position.extend(-parallax_info.depth) + Vec3::new(0., parallax_info.offset, 0.);
}