use crate::ReflectComponent;
use bevy_ecs::prelude::{Component, Entity};
use bevy_reflect::Reflect;
#[derive(Component, Reflect, Eq, PartialEq, Debug, Clone)]
#[relationship(relationship_target = EffectedBy)]
#[reflect(Component, PartialEq, Debug, Clone)]
pub struct Effecting(pub Entity);
#[derive(Component, Reflect, Eq, PartialEq, Debug, Clone)]
#[relationship_target(relationship = Effecting, linked_spawn)]
#[reflect(Component, PartialEq, Debug, Clone)]
pub struct EffectedBy(Vec<Entity>);
impl<'a> IntoIterator for &'a EffectedBy {
type Item = <Self::IntoIter as Iterator>::Item;
type IntoIter = std::slice::Iter<'a, Entity>;
#[inline(always)]
fn into_iter(self) -> Self::IntoIter {
self.0.iter()
}
}