Skip to content

Commit

Permalink
Make ActiveAnimation::set_weight return &mut Self (#14914)
Browse files Browse the repository at this point in the history
# Objective

Fixes #14907.

## Solution

Changes `ActiveAnimation::set_weight` to return `&mut Self`.

## Testing

Simple API change, I don't think this needs explicit testing.
  • Loading branch information
aecsocket authored Aug 25, 2024
1 parent 0070bdc commit eb6e97c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,9 @@ impl ActiveAnimation {
}

/// Sets the weight of this animation.
pub fn set_weight(&mut self, weight: f32) {
pub fn set_weight(&mut self, weight: f32) -> &mut Self {
self.weight = weight;
self
}

/// Pause the animation.
Expand Down

0 comments on commit eb6e97c

Please sign in to comment.