mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 11:50:53 +00:00
chore(): cargo fmt
This commit is contained in:
parent
742c5b19f0
commit
2d459abaf3
@ -8,7 +8,7 @@ use std::time::Duration;
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
|
|
||||||
use bevy_gltf_blueprints::{
|
use bevy_gltf_blueprints::{
|
||||||
BlueprintAnimationPlayerLink, BlueprintAnimations, BluePrintBundle, BlueprintName, GameWorldTag,
|
BluePrintBundle, BlueprintAnimationPlayerLink, BlueprintAnimations, BlueprintName, GameWorldTag,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Fox, Robot};
|
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)
|
// example of changing animation of entities based on proximity to the player, for "fox" entities (Tag component)
|
||||||
pub fn animation_change_on_proximity_foxes(
|
pub fn animation_change_on_proximity_foxes(
|
||||||
players: Query<&GlobalTransform, With<Player>>,
|
players: Query<&GlobalTransform, With<Player>>,
|
||||||
animated_foxes: Query<(&GlobalTransform, &BlueprintAnimationPlayerLink, &BlueprintAnimations), With<Fox>>,
|
animated_foxes: Query<
|
||||||
|
(
|
||||||
|
&GlobalTransform,
|
||||||
|
&BlueprintAnimationPlayerLink,
|
||||||
|
&BlueprintAnimations,
|
||||||
|
),
|
||||||
|
With<Fox>,
|
||||||
|
>,
|
||||||
|
|
||||||
mut animation_players: Query<&mut AnimationPlayer>,
|
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)
|
// 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(
|
pub fn animation_change_on_proximity_robots(
|
||||||
players: Query<&GlobalTransform, With<Player>>,
|
players: Query<&GlobalTransform, With<Player>>,
|
||||||
animated_robots: Query<(&GlobalTransform, &BlueprintAnimationPlayerLink, &BlueprintAnimations), With<Robot>>,
|
animated_robots: Query<
|
||||||
|
(
|
||||||
|
&GlobalTransform,
|
||||||
|
&BlueprintAnimationPlayerLink,
|
||||||
|
&BlueprintAnimations,
|
||||||
|
),
|
||||||
|
With<Robot>,
|
||||||
|
>,
|
||||||
|
|
||||||
mut animation_players: Query<&mut AnimationPlayer>,
|
mut animation_players: Query<&mut AnimationPlayer>,
|
||||||
) {
|
) {
|
||||||
|
@ -6,12 +6,12 @@ pub use in_game::*;
|
|||||||
use std::{collections::HashMap, fs, time::Duration};
|
use std::{collections::HashMap, fs, time::Duration};
|
||||||
|
|
||||||
use bevy_gltf_blueprints::{
|
use bevy_gltf_blueprints::{
|
||||||
BlueprintAnimationPlayerLink, BlueprintName, BlueprintsList,
|
BlueprintAnimationPlayerLink, BlueprintName, BlueprintsList, GltfBlueprintsSet, SceneAnimations,
|
||||||
GltfBlueprintsSet, SceneAnimations,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy::{
|
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};
|
use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState};
|
||||||
|
|
||||||
@ -39,7 +39,8 @@ fn validate_export(
|
|||||||
blueprints_list: Query<(Entity, &BlueprintsList)>,
|
blueprints_list: Query<(Entity, &BlueprintsList)>,
|
||||||
root: Query<(Entity, &Name, &Children), (Without<Parent>, With<Children>)>,
|
root: Query<(Entity, &Name, &Children), (Without<Parent>, With<Children>)>,
|
||||||
) {
|
) {
|
||||||
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;
|
let mut nested_blueprint_found = false;
|
||||||
for (entity, name, blueprint_name) in blueprints.iter() {
|
for (entity, name, blueprint_name) in blueprints.iter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user