Added get_main_animation for AnimationTransitions (#14104)

# Objective

Added a getter for the main animation of `AnimationTransitions`.

## Solution

Added `get_main_animation` for `AnimationTransitions`.
This commit is contained in:
Mincong Lu 2024-07-02 21:28:42 +08:00 committed by GitHub
parent 1d907c5668
commit ce5254e3ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,6 +93,11 @@ impl AnimationTransitions {
self.main_animation = Some(new_animation);
player.start(new_animation)
}
/// Obtain the currently playing main animation.
pub fn get_main_animation(&self) -> Option<AnimationNodeIndex> {
self.main_animation
}
}
/// A system that alters the weight of currently-playing transitions based on