From 2d459abaf3aefa6ee56ffb458b157813eedf1fc4 Mon Sep 17 00:00:00 2001 From: "kaosat.dev" Date: Mon, 15 Apr 2024 23:02:09 +0200 Subject: [PATCH] chore(): cargo fmt --- .../animation/src/game/in_game.rs | 20 ++++++++++++++++--- testing/bevy_example/src/game/mod.rs | 9 +++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs b/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs index 5777bba..ba8d678 100644 --- a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs +++ b/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs @@ -8,7 +8,7 @@ use std::time::Duration; use bevy::prelude::*; use bevy_gltf_blueprints::{ - BlueprintAnimationPlayerLink, BlueprintAnimations, BluePrintBundle, BlueprintName, GameWorldTag, + BluePrintBundle, BlueprintAnimationPlayerLink, BlueprintAnimations, BlueprintName, GameWorldTag, }; use super::{Fox, Robot}; @@ -90,7 +90,14 @@ pub fn spawn_test( // example of changing animation of entities based on proximity to the player, for "fox" entities (Tag component) pub fn animation_change_on_proximity_foxes( players: Query<&GlobalTransform, With>, - animated_foxes: Query<(&GlobalTransform, &BlueprintAnimationPlayerLink, &BlueprintAnimations), With>, + animated_foxes: Query< + ( + &GlobalTransform, + &BlueprintAnimationPlayerLink, + &BlueprintAnimations, + ), + With, + >, mut animation_players: Query<&mut AnimationPlayer>, ) { @@ -126,7 +133,14 @@ pub fn animation_change_on_proximity_foxes( // example of changing animation of entities based on proximity to the player, this time for the "robot" entities (Tag component) pub fn animation_change_on_proximity_robots( players: Query<&GlobalTransform, With>, - animated_robots: Query<(&GlobalTransform, &BlueprintAnimationPlayerLink, &BlueprintAnimations), With>, + animated_robots: Query< + ( + &GlobalTransform, + &BlueprintAnimationPlayerLink, + &BlueprintAnimations, + ), + With, + >, mut animation_players: Query<&mut AnimationPlayer>, ) { diff --git a/testing/bevy_example/src/game/mod.rs b/testing/bevy_example/src/game/mod.rs index fa46bc6..3e2dc03 100644 --- a/testing/bevy_example/src/game/mod.rs +++ b/testing/bevy_example/src/game/mod.rs @@ -6,12 +6,12 @@ pub use in_game::*; use std::{collections::HashMap, fs, time::Duration}; use bevy_gltf_blueprints::{ - BlueprintAnimationPlayerLink, BlueprintName, BlueprintsList, - GltfBlueprintsSet, SceneAnimations, + BlueprintAnimationPlayerLink, BlueprintName, BlueprintsList, GltfBlueprintsSet, SceneAnimations, }; use bevy::{ - prelude::*, render::view::screenshot::ScreenshotManager, time::common_conditions::on_timer, window::PrimaryWindow + prelude::*, render::view::screenshot::ScreenshotManager, time::common_conditions::on_timer, + window::PrimaryWindow, }; use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; @@ -39,7 +39,8 @@ fn validate_export( blueprints_list: Query<(Entity, &BlueprintsList)>, root: Query<(Entity, &Name, &Children), (Without, With)>, ) { - let animations_found = !animation_player_links.is_empty() && scene_animations.into_iter().len() == 4; + let animations_found = + !animation_player_links.is_empty() && scene_animations.into_iter().len() == 4; let mut nested_blueprint_found = false; for (entity, name, blueprint_name) in blueprints.iter() {