From 631586b7285cca84db8ff1561c3d078e5863fe96 Mon Sep 17 00:00:00 2001 From: mamekoro <86554319+mamekoro@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:19:14 +0000 Subject: [PATCH 1/2] Make `bevy::core::update_frame_count` public --- crates/bevy_core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index e5682d3a92262..4de61ea05cdda 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -154,7 +154,7 @@ impl Plugin for FrameCountPlugin { } } -fn update_frame_count(mut frame_count: ResMut) { +pub fn update_frame_count(mut frame_count: ResMut) { frame_count.0 = frame_count.0.wrapping_add(1); } From 2e4232491cff7c87a61fbe0d47c776668b441bf5 Mon Sep 17 00:00:00 2001 From: mamekoro <86554319+mamekoro@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:29:46 +0000 Subject: [PATCH 2/2] Add doc for `bevy::core::update_frame_count` --- crates/bevy_core/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index 4de61ea05cdda..c222af6a9d9fe 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -154,6 +154,9 @@ impl Plugin for FrameCountPlugin { } } +/// A system used to increment [`FrameCount`] with wrapping addition. +/// +/// See [`FrameCount`] for more details. pub fn update_frame_count(mut frame_count: ResMut) { frame_count.0 = frame_count.0.wrapping_add(1); }