mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Update old docs from Timer (#6646)
When I was upgrading to 0.9 noticed there were some changes to the timer, mainly the `TimerMode`. When switching from the old `is_repeating()` and `set_repeating()` to the new `mode()` and `set_mode()` noticed the docs still had the old description.
This commit is contained in:
parent
a02e44c0db
commit
63c0cca0d7
1 changed files with 3 additions and 2 deletions
|
@ -155,7 +155,7 @@ impl Timer {
|
|||
self.duration = duration;
|
||||
}
|
||||
|
||||
/// Returns `true` if the timer is repeating.
|
||||
/// Returns the mode of the timer.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
|
@ -168,7 +168,7 @@ impl Timer {
|
|||
self.mode
|
||||
}
|
||||
|
||||
/// Sets whether the timer is repeating or not.
|
||||
/// Sets the mode of the timer.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
|
@ -177,6 +177,7 @@ impl Timer {
|
|||
/// timer.set_mode(TimerMode::Once);
|
||||
/// assert_eq!(timer.mode(), TimerMode::Once);
|
||||
/// ```
|
||||
#[doc(alias = "repeating")]
|
||||
#[inline]
|
||||
pub fn set_mode(&mut self, mode: TimerMode) {
|
||||
if self.mode != TimerMode::Repeating && mode == TimerMode::Repeating && self.finished {
|
||||
|
|
Loading…
Reference in a new issue