Update to bevy 0.13 (#87)

Co-authored-by: Lee-Orr <lee-orr@users.noreply.github.com>
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
This commit is contained in:
rewin
2024-04-10 04:47:40 +03:00
committed by GitHub
parent 03f90eee47
commit eb1198d440
67 changed files with 3747 additions and 1682 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
use bevy::{
ecs::entity::{EntityHashMap, EntityHashSet},
prelude::*,
utils::{EntityHashMap, EntityHashSet},
};
/// Find the parent entity of `target`. Returns `None` if `target` has no
@@ -29,7 +29,7 @@ pub(crate) fn nearest_common_ancestor(
q_parents: &Query<Option<&Parent>>,
) -> Option<Entity> {
// Find the depth of each entity in the tree
let mut depths: EntityHashMap<Entity, usize> = EntityHashMap::default();
let mut depths = EntityHashMap::default();
for &ent in entities {
depths.insert(ent, find_depth(ent, q_parents));
}
@@ -39,7 +39,7 @@ pub(crate) fn nearest_common_ancestor(
// Traverse up the tree from each entity until we find each one's ancestor
// at the level of lowest_depth
let mut equalized: EntityHashSet<Entity> = EntityHashSet::default();
let mut equalized = EntityHashSet::default();
for ent in entities {
let mut depth = depths[ent];
let mut result = *ent;
@@ -59,7 +59,7 @@ pub(crate) fn nearest_common_ancestor(
// by adding a some kind of mode switch to this function's parameters.
// Walk up the tree from each of those entities until we find the common ancestor
let mut parents: EntityHashSet<Entity> = EntityHashSet::default();
let mut parents = EntityHashSet::default();
loop {
for &ent in equalized.iter() {
if let Some(parent) = find_parent(ent, q_parents) {