Skip to content

Commit

Permalink
can also delay on chains
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Jul 2, 2024
1 parent 2ee2baa commit 75e6ab8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ impl<T: Default> EasingChainComponent<T> {
self.0 = tmp;
self
}

/// Adds a delay before triggering the easing.
pub fn delay(mut self, duration: Duration) -> Self {
self.0[0].paused = true;
self.0[0].timer = Timer::new(duration, TimerMode::Once);
self
}
}

/// Trait marking components that can be eased
Expand Down

0 comments on commit 75e6ab8

Please sign in to comment.