@@ -28,9 +28,9 @@ use bevy_app::{App, Plugin, PostUpdate};
2828use bevy_asset:: { Asset , AssetApp , Assets , Handle } ;
2929use bevy_core:: Name ;
3030use bevy_ecs:: {
31- entity:: { MapEntities , VisitEntities } ,
31+ entity:: { VisitEntities , VisitEntitiesMut } ,
3232 prelude:: * ,
33- reflect:: { ReflectMapEntities , ReflectVisitEntities } ,
33+ reflect:: { ReflectMapEntities , ReflectVisitEntities , ReflectVisitEntitiesMut } ,
3434 world:: EntityMutExcept ,
3535} ;
3636use bevy_math:: FloatExt ;
@@ -530,8 +530,8 @@ impl Hash for AnimationTargetId {
530530/// Note that each entity can only be animated by one animation player at a
531531/// time. However, you can change [`AnimationTarget`]'s `player` property at
532532/// runtime to change which player is responsible for animating the entity.
533- #[ derive( Clone , Copy , Component , Reflect , VisitEntities ) ]
534- #[ reflect( Component , MapEntities , VisitEntities ) ]
533+ #[ derive( Clone , Copy , Component , Reflect , VisitEntities , VisitEntitiesMut ) ]
534+ #[ reflect( Component , MapEntities , VisitEntities , VisitEntitiesMut ) ]
535535pub struct AnimationTarget {
536536 /// The ID of this animation target.
537537 ///
@@ -1302,12 +1302,6 @@ impl From<&Name> for AnimationTargetId {
13021302 }
13031303}
13041304
1305- impl MapEntities for AnimationTarget {
1306- fn map_entities < M : EntityMapper > ( & mut self , entity_mapper : & mut M ) {
1307- self . player = entity_mapper. map_entity ( self . player ) ;
1308- }
1309- }
1310-
13111305impl AnimationGraphEvaluator {
13121306 // Starts a new depth-first search.
13131307 fn reset ( & mut self , root : AnimationNodeIndex , node_count : usize ) {
0 commit comments