|
|
|
@ -226,14 +226,14 @@ fn init_obstacles(
|
|
|
|
info!("Jitter for {i} is {jitter}");
|
|
|
|
info!("Jitter for {i} is {jitter}");
|
|
|
|
let above = {
|
|
|
|
let above = {
|
|
|
|
let x = 300.0 * i as f32;
|
|
|
|
let x = 300.0 * i as f32;
|
|
|
|
let y = 300.0 + jitter;
|
|
|
|
let y = f32::min(300.0 + jitter, 400.0);
|
|
|
|
Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0))
|
|
|
|
Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0))
|
|
|
|
};
|
|
|
|
};
|
|
|
|
commands.spawn((pipe.clone(), above));
|
|
|
|
commands.spawn((pipe.clone(), above));
|
|
|
|
|
|
|
|
|
|
|
|
let below = {
|
|
|
|
let below = {
|
|
|
|
let x = 300.0 * i as f32;
|
|
|
|
let x = 300.0 * i as f32;
|
|
|
|
let y = -200.0 + jitter;
|
|
|
|
let y = f32::max(-200.0 + jitter, -300.0);
|
|
|
|
Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0))
|
|
|
|
Transform::from_xyz(x, y, -1.0).with_scale(Vec3::splat(100.0))
|
|
|
|
};
|
|
|
|
};
|
|
|
|
commands.spawn((pipe.clone(), below));
|
|
|
|
commands.spawn((pipe.clone(), below));
|
|
|
|
|