@@ -271,9 +271,9 @@ fn particle_system() -> BoxedSystem {
271
271
272
272
#[ derive( Fetch ) ]
273
273
struct CameraQuery {
274
- pos : Mutable < Vec2 > ,
275
- vel : Mutable < Vec2 > ,
276
- view : Mutable < Mat3 > ,
274
+ pos : ComponentMut < Vec2 > ,
275
+ vel : ComponentMut < Vec2 > ,
276
+ view : ComponentMut < Mat3 > ,
277
277
}
278
278
279
279
/// System which makes the camera track the player smoothly.
@@ -387,7 +387,7 @@ fn lifetime_system(dt: f32) -> BoxedSystem {
387
387
. with_query ( Query :: new ( ( entity_ids ( ) , lifetime ( ) . as_mut ( ) ) ) )
388
388
. with_cmd_mut ( )
389
389
. build (
390
- move |mut q : QueryBorrow < ( EntityIds , Mutable < f32 > ) > , cmd : & mut CommandBuffer | {
390
+ move |mut q : QueryBorrow < ( EntityIds , ComponentMut < f32 > ) > , cmd : & mut CommandBuffer | {
391
391
for ( id, lf) in & mut q {
392
392
if * lf <= 0.0 {
393
393
cmd. set ( id, health ( ) , 0.0 ) ;
@@ -495,10 +495,10 @@ struct PlayerQuery {
495
495
id : EntityIds ,
496
496
player : Component < ( ) > ,
497
497
pos : Component < Vec2 > ,
498
- rot : Mutable < f32 > ,
499
- vel : Mutable < Vec2 > ,
500
- difficulty : Mutable < f32 > ,
501
- invincibility : Mutable < f32 > ,
498
+ rot : ComponentMut < f32 > ,
499
+ vel : ComponentMut < Vec2 > ,
500
+ difficulty : ComponentMut < f32 > ,
501
+ invincibility : ComponentMut < f32 > ,
502
502
material : Component < f32 > ,
503
503
}
504
504
@@ -592,7 +592,7 @@ fn despawn_out_of_bounds() -> BoxedSystem {
592
592
. with_query ( Query :: new ( ( position ( ) . modified ( ) , health ( ) . as_mut ( ) ) ) . without ( player ( ) ) )
593
593
. build (
594
594
|mut player : QueryBorrow < Component < Vec2 > , _ > ,
595
- mut asteroids : QueryBorrow < ( ChangeFilter < Vec2 > , Mutable < f32 > ) , _ > | {
595
+ mut asteroids : QueryBorrow < ( ChangeFilter < Vec2 > , ComponentMut < f32 > ) , _ > | {
596
596
if let Some ( player_pos) = player. first ( ) {
597
597
for ( asteroid, health) in & mut asteroids {
598
598
if player_pos. distance ( * asteroid) > 2500.0 {
@@ -616,7 +616,7 @@ fn despawn_dead() -> BoxedSystem {
616
616
)
617
617
. with_cmd_mut ( )
618
618
. build (
619
- |mut resources : EntityBorrow < Mutable < StdRng > > ,
619
+ |mut resources : EntityBorrow < ComponentMut < StdRng > > ,
620
620
mut q : QueryBorrow < ( EntityIds , Component < Vec2 > , Component < _ > , Opt < _ > ) , _ > ,
621
621
cmd : & mut CommandBuffer | {
622
622
let rng = resources. get ( ) . unwrap ( ) ;
@@ -652,7 +652,7 @@ fn spawn_asteroids(max_count: usize) -> BoxedSystem {
652
652
. with_query ( Query :: new ( asteroid ( ) ) )
653
653
. with_cmd_mut ( )
654
654
. build (
655
- move |mut resources : EntityBorrow < Mutable < StdRng > > ,
655
+ move |mut resources : EntityBorrow < ComponentMut < StdRng > > ,
656
656
mut players : QueryBorrow < ( Component < Vec2 > , Component < f32 > ) , _ > ,
657
657
mut existing : QueryBorrow < Component < ( ) > > ,
658
658
cmd : & mut CommandBuffer | {
0 commit comments