aboutsummaryrefslogtreecommitdiff
path: root/examples/breakout/breakout.rs
diff options
context:
space:
mode:
authorLemonzyy <lemonzy.pro@gmail.com>2022-11-14 12:04:23 +0100
committerLemonzyy <lemonzy.pro@gmail.com>2022-11-14 12:04:23 +0100
commitfc24c1b15071cf9fe44664bf9620d9dacd84154d (patch)
tree3e8313ba9a74de4fe31f9f0ab55dbf10c7ce17cd /examples/breakout/breakout.rs
parent82e2288afc91ac196295fa05796a925ed720c764 (diff)
Update Bevy to 0.9
Diffstat (limited to 'examples/breakout/breakout.rs')
-rw-r--r--examples/breakout/breakout.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/breakout/breakout.rs b/examples/breakout/breakout.rs
index 123817c..e57e2d7 100644
--- a/examples/breakout/breakout.rs
+++ b/examples/breakout/breakout.rs
@@ -61,6 +61,7 @@ struct CollisionEvent;
#[derive(Component)]
struct Score;
+#[derive(Resource)]
struct CollisionSound(Handle<AudioSource>);
pub type BrickId = u64;
@@ -152,7 +153,7 @@ fn main() {
SystemSet::new()
// https://github.com/bevyengine/bevy/issues/1839
// Run on a fixed Timestep,on all clients, in GameState::Running
- .with_run_criteria(FixedTimestep::step(TIME_STEP as f64).chain(
+ .with_run_criteria(FixedTimestep::step(TIME_STEP as f64).pipe(
|In(input): In<ShouldRun>, state: Res<State<GameState>>| match state.current() {
GameState::Running => input,
_ => ShouldRun::No,
@@ -169,7 +170,7 @@ fn main() {
SystemSet::new()
// https://github.com/bevyengine/bevy/issues/1839
// Run on a fixed Timestep, only for the hosting client, in GameState::Running
- .with_run_criteria(FixedTimestep::step(TIME_STEP as f64).chain(
+ .with_run_criteria(FixedTimestep::step(TIME_STEP as f64).pipe(
|In(input): In<ShouldRun>,
state: Res<State<GameState>>,
server: Res<Server>| match state.current() {