Skip to content

Deprecate either animation_is_playing or is_playing_animation from AnimationPlayer #14386

@FastestMolasses

Description

@FastestMolasses

How can Bevy's documentation be improved?

/// 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 {
    self.active_animations.contains_key(&animation)
}

/// Check if the given animation node is being played.
pub fn is_playing_animation(&self, animation: AnimationNodeIndex) -> bool {
    self.active_animations.contains_key(&animation)
}

These functions implemented in AnimationPlayer are equivalent, just named differently.

https://github.com/bevyengine/bevy/blob/main/crates/bevy_animation/src/lib.rs#L607
https://github.com/bevyengine/bevy/blob/main/crates/bevy_animation/src/lib.rs#L695

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-DocsAn addition or correction to our documentationS-Needs-TriageThis issue needs to be labelled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions