Bevy 0.16 upgrade (#24)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::{GameState, heads_database::HeadsDatabase, loading_assets::GameAssets};
|
||||
use bevy::{ecs::system::SystemParam, prelude::*, utils::HashMap};
|
||||
use bevy::{ecs::system::SystemParam, platform::collections::HashMap, prelude::*};
|
||||
use std::time::Duration;
|
||||
|
||||
#[derive(Component, Debug)]
|
||||
@@ -91,14 +91,14 @@ fn setup_projectile_origin(
|
||||
fn setup_once_loaded(
|
||||
mut commands: Commands,
|
||||
mut query: Query<(Entity, &mut AnimationPlayer), Added<AnimationPlayer>>,
|
||||
parent_query: Query<&Parent>,
|
||||
parent: Query<&ChildOf>,
|
||||
animated_character: Query<&AnimatedCharacter>,
|
||||
assets: Res<GameAssets>,
|
||||
gltf_assets: Res<Assets<Gltf>>,
|
||||
mut graphs: ResMut<Assets<AnimationGraph>>,
|
||||
) {
|
||||
for (entity, mut player) in &mut query {
|
||||
let Some(_animated_character) = parent_query
|
||||
let Some(_animated_character) = parent
|
||||
.iter_ancestors(entity)
|
||||
.find_map(|ancestor| animated_character.get(ancestor).ok())
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user