From 901f4070680642f05146e7b0fff523136a3e02a4 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 9 Jan 2024 11:37:36 -0800 Subject: [PATCH] Added system iterator --- crates/content/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/content/src/lib.rs b/crates/content/src/lib.rs index a95660e..20f5960 100644 --- a/crates/content/src/lib.rs +++ b/crates/content/src/lib.rs @@ -272,6 +272,11 @@ impl Content { // Access methods impl Content { + /// Iterate over all valid system handles + pub fn iter_systems(&self) -> impl Iterator { + (0..self.systems.len()).map(|x| SystemHandle { index: x }) + } + /// Get the handle for the starfield sprite pub fn get_starfield_handle(&self) -> SpriteHandle { match self.starfield_handle {