diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index e437769d41d7b..8d55cb7ea5c81 100755 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -856,8 +856,8 @@ impl AnimationPlayer { self.active_animations.iter_mut() } - #[deprecated = "Use `animation_is_playing` instead"] - /// Check if the given animation node is being played. + /// Returns true if the animation is currently playing or paused, or false + /// if the animation is stopped. pub fn is_playing_animation(&self, animation: AnimationNodeIndex) -> bool { self.active_animations.contains_key(&animation) } @@ -944,6 +944,7 @@ impl AnimationPlayer { self.active_animations.get_mut(&animation) } + #[deprecated = "Use `is_playing_animation` instead"] /// Returns true if the animation is currently playing or paused, or false /// if the animation is stopped. pub fn animation_is_playing(&self, animation: AnimationNodeIndex) -> bool { diff --git a/examples/animation/animation_graph.rs b/examples/animation/animation_graph.rs index 9c2fe1979e332..80c7bf6e4dc88 100644 --- a/examples/animation/animation_graph.rs +++ b/examples/animation/animation_graph.rs @@ -452,7 +452,7 @@ fn sync_weights(mut query: Query<(&mut AnimationPlayer, &ExampleAnimationWeights .zip(animation_weights.weights.iter()) { // If the animation happens to be no longer active, restart it. - if !animation_player.animation_is_playing(animation_node_index.into()) { + if !animation_player.is_playing_animation(animation_node_index.into()) { animation_player.play(animation_node_index.into()); }