mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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:
parent
1d907c5668
commit
ce5254e3ec
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue