bevy/crates/bevy_animation/src
Lixou 20264d0810
Make AnimationPlayer::start and ::play work accordingly to documentation (#14546)
# Objective

While scrolling through the animation crate, I was confused by the docs
and code for the two methods. One does nothing for resetting an
animation, the other just resets the weights for whatever reason.

## Solution

Made the functions work accordingly to their documentation.
`start` now replays the animation.
And `play` doesn't reset the weight anymore. I have no clue why it
should. `play` is there to don't do anything to an already existing
animation.

## Testing

I tested the current 0.14 code with bevy playground in the Animated Fox
exampled and changed it such that on pressing space, either `play` or
`start` would be called. Neither changed anything.
I then inlined the function for start there and it restarted the
animation, so it should work.

---

## Migration Guide

`AnimationPlayer::start` now correspondingly to its docs restarts a
running animation.
`AnimationPlayer::play` doesn't reset the weight anymore.
2024-07-31 14:07:53 +00:00
..
animatable.rs Remove ClampColor (#13307) 2024-05-10 13:15:56 +00:00
graph.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
lib.rs Make AnimationPlayer::start and ::play work accordingly to documentation (#14546) 2024-07-31 14:07:53 +00:00
transition.rs Fix repeated animation transition bug (#14411) 2024-07-22 19:17:46 +00:00
util.rs