Adds doc note that Timer and Stopwatch must be progressed manually (#13441)

# Objective
- Fix #13421 

## Solution

- Add an explicit note at the root of each struct that they must be
ticked manually

## Testing

- Generated the docs and the changes look good
---

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
Co-authored-by: Matty <weatherleymatthew@gmail.com>
This commit is contained in:
Spooky Th Ghost 2024-05-20 15:46:25 -04:00 committed by GitHub
parent 5db52663b3
commit 612e77ef78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -4,6 +4,7 @@ use bevy_utils::Duration;
/// A Stopwatch is a struct that track elapsed time when started. /// A Stopwatch is a struct that track elapsed time when started.
/// ///
/// Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.
/// # Examples /// # Examples
/// ///
/// ``` /// ```

View file

@ -10,6 +10,8 @@ use bevy_utils::Duration;
/// exceeded, and can still be reset at any given point. /// exceeded, and can still be reset at any given point.
/// ///
/// Paused timers will not have elapsed time increased. /// Paused timers will not have elapsed time increased.
///
/// Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called.
#[derive(Clone, Debug, Default, PartialEq, Eq)] #[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))] #[cfg_attr(feature = "serialize", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Default))] #[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Default))]