Change visibility of bevy::core::update_frame_count to pub (#10111)

# Objective
Closes #10107

The visibility of `bevy::core::update_frame_count` should be `pub` so it
can be used in third-party code like this:

```rust
impl Plugin for MyPlugin {
    fn build(&self, app: &mut App) {
        app.add_systems(Last, use_frame_count.before(bevy::core::update_frame_count));
    }
}
```

## Solution
Make `bevy::core::update_frame_count` public.

---

## Changelog

### Added
- Documentation for `bevy::core::update_frame_count`

### Changed
- Visibility of `bevy::core::update_frame_count` is now `pub`
This commit is contained in:
mamekoro 2023-10-16 22:43:02 +09:00 committed by GitHub
parent e23d7cf501
commit 1258ceb62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,10 @@ impl Plugin for FrameCountPlugin {
}
}
fn update_frame_count(mut frame_count: ResMut<FrameCount>) {
/// A system used to increment [`FrameCount`] with wrapping addition.
///
/// See [`FrameCount`] for more details.
pub fn update_frame_count(mut frame_count: ResMut<FrameCount>) {
frame_count.0 = frame_count.0.wrapping_add(1);
}