Added system iterator

master
Mark 2024-01-09 11:37:36 -08:00
parent 3c0d6786bc
commit 901f407068
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 5 additions and 0 deletions

View File

@ -272,6 +272,11 @@ impl Content {
// Access methods // Access methods
impl Content { impl Content {
/// Iterate over all valid system handles
pub fn iter_systems(&self) -> impl Iterator<Item = SystemHandle> {
(0..self.systems.len()).map(|x| SystemHandle { index: x })
}
/// Get the handle for the starfield sprite /// Get the handle for the starfield sprite
pub fn get_starfield_handle(&self) -> SpriteHandle { pub fn get_starfield_handle(&self) -> SpriteHandle {
match self.starfield_handle { match self.starfield_handle {