Public access for AnimationClip.duration (#4615)
# Objective - Small change that better facilitates custom animation systems ## Solution - Added a public access function to `bevy::animation::AnimationClip`, making duration publicly readable ---
This commit is contained in:
parent
328c26d02c
commit
8e03634457
@ -73,6 +73,11 @@ impl AnimationClip {
|
|||||||
&self.curves
|
&self.curves
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Duration of the clip, represented in seconds
|
||||||
|
pub fn duration(&self) -> &f32 {
|
||||||
|
&self.duration
|
||||||
|
}
|
||||||
|
|
||||||
/// Add a [`VariableCurve`] to an [`EntityPath`].
|
/// Add a [`VariableCurve`] to an [`EntityPath`].
|
||||||
pub fn add_curve_to_path(&mut self, path: EntityPath, curve: VariableCurve) {
|
pub fn add_curve_to_path(&mut self, path: EntityPath, curve: VariableCurve) {
|
||||||
// Update the duration of the animation by this curve duration if it's longer
|
// Update the duration of the animation by this curve duration if it's longer
|
||||||
|
Loading…
Reference in New Issue
Block a user