diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 18d66b3..1a49f99 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: - run: mdbook build guide - name: Upload Artefact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: guide path: guide/book @@ -49,13 +49,13 @@ jobs: if: github.event_name == 'push' && ${{ github.ref == 'refs/heads/main' }} steps: - name: Download guide - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: guide path: dist/guide - name: Download asteroids - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: asteroids path: dist/asteroids diff --git a/asteroids/src/main.rs b/asteroids/src/main.rs index a59eac0..4b3736c 100644 --- a/asteroids/src/main.rs +++ b/asteroids/src/main.rs @@ -271,9 +271,9 @@ fn particle_system() -> BoxedSystem { #[derive(Fetch)] struct CameraQuery { - pos: Mutable, - vel: Mutable, - view: Mutable, + pos: ComponentMut, + vel: ComponentMut, + view: ComponentMut, } /// System which makes the camera track the player smoothly. @@ -387,7 +387,7 @@ fn lifetime_system(dt: f32) -> BoxedSystem { .with_query(Query::new((entity_ids(), lifetime().as_mut()))) .with_cmd_mut() .build( - move |mut q: QueryBorrow<(EntityIds, Mutable)>, cmd: &mut CommandBuffer| { + move |mut q: QueryBorrow<(EntityIds, ComponentMut)>, cmd: &mut CommandBuffer| { for (id, lf) in &mut q { if *lf <= 0.0 { cmd.set(id, health(), 0.0); @@ -495,10 +495,10 @@ struct PlayerQuery { id: EntityIds, player: Component<()>, pos: Component, - rot: Mutable, - vel: Mutable, - difficulty: Mutable, - invincibility: Mutable, + rot: ComponentMut, + vel: ComponentMut, + difficulty: ComponentMut, + invincibility: ComponentMut, material: Component, } @@ -592,7 +592,7 @@ fn despawn_out_of_bounds() -> BoxedSystem { .with_query(Query::new((position().modified(), health().as_mut())).without(player())) .build( |mut player: QueryBorrow, _>, - mut asteroids: QueryBorrow<(ChangeFilter, Mutable), _>| { + mut asteroids: QueryBorrow<(ChangeFilter, ComponentMut), _>| { if let Some(player_pos) = player.first() { for (asteroid, health) in &mut asteroids { if player_pos.distance(*asteroid) > 2500.0 { @@ -616,7 +616,7 @@ fn despawn_dead() -> BoxedSystem { ) .with_cmd_mut() .build( - |mut resources: EntityBorrow>, + |mut resources: EntityBorrow>, mut q: QueryBorrow<(EntityIds, Component, Component<_>, Opt<_>), _>, cmd: &mut CommandBuffer| { let rng = resources.get().unwrap(); @@ -652,7 +652,7 @@ fn spawn_asteroids(max_count: usize) -> BoxedSystem { .with_query(Query::new(asteroid())) .with_cmd_mut() .build( - move |mut resources: EntityBorrow>, + move |mut resources: EntityBorrow>, mut players: QueryBorrow<(Component, Component), _>, mut existing: QueryBorrow>, cmd: &mut CommandBuffer| {