Use chain in breakout example (#10124)
# Objective - We should encourage of the simpler to reason about chain. ## Solution - Use it in the breakout example --- ## Changelog - Switch breakout to use `chain` instead of `before` and `after`
This commit is contained in:
parent
490699c311
commit
88599d7fa0
@ -59,13 +59,13 @@ fn main() {
|
||||
.add_systems(
|
||||
FixedUpdate,
|
||||
(
|
||||
apply_velocity,
|
||||
move_paddle,
|
||||
check_for_collisions,
|
||||
apply_velocity.before(check_for_collisions),
|
||||
move_paddle
|
||||
.before(check_for_collisions)
|
||||
.after(apply_velocity),
|
||||
play_collision_sound.after(check_for_collisions),
|
||||
),
|
||||
play_collision_sound,
|
||||
)
|
||||
// `chain`ing systems together runs them in order
|
||||
.chain(),
|
||||
)
|
||||
.add_systems(Update, (update_scoreboard, bevy::window::close_on_esc))
|
||||
.run();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user