22 bevy:: {
33 prelude:: {
44 default, shape, App , Assets , Camera3dBundle , Color , Commands , Component , Deref , Handle ,
5- IntoSystemConfig , Mesh , PbrBundle , PointLight , PointLightBundle , Query , Res , ResMut ,
6- Resource , StandardMaterial , StartupSet , Transform , Vec3 , With ,
5+ Mesh , PbrBundle , PointLight , PointLightBundle , PostStartup , Query , Res , ResMut ,
6+ Resource , StandardMaterial , Startup , Transform , Update , Vec3 , With ,
77 } ,
88 time:: Time ,
99 DefaultPlugins ,
@@ -19,10 +19,10 @@ use {
1919fn main ( ) {
2020 App :: new ( )
2121 . add_plugins ( DefaultPlugins )
22- . add_plugin ( AudioPlugin :: new ( ) )
23- . add_startup_system ( init_assets)
24- . add_startup_system ( setup . in_base_set ( StartupSet :: PostStartup ) )
25- . add_system ( change_velocity)
22+ . add_plugins ( AudioPlugin :: new ( ) )
23+ . add_systems ( Startup , init_assets)
24+ . add_systems ( PostStartup , setup )
25+ . add_systems ( Update , change_velocity)
2626 . run ( ) ;
2727}
2828
@@ -111,7 +111,9 @@ fn change_velocity(
111111 let z = time. elapsed_seconds_wrapped ( ) . cos ( ) * 3.0 ;
112112 let delta = time. delta_seconds ( ) ;
113113
114- let Some ( sink) = sinks. get_mut ( & sink. 0 ) else { return } ;
114+ let Some ( sink) = sinks. get_mut ( & sink. 0 ) else {
115+ return ;
116+ } ;
115117
116118 let prev_pos = emitter. translation ;
117119 let position = Vec3 :: new ( x, prev_pos. y , z) ;
0 commit comments