pub struct CurrentLevel { /* private fields */ }Expand description
The level the world holds, if any: what load_level made of it. A
resource of every App, empty until a level loads.
Implementations§
Source§impl CurrentLevel
impl CurrentLevel
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
The level’s name, as load_level was given it, if one is loaded.
Sourcepub fn background(&self) -> Option<Color>
pub fn background(&self) -> Option<Color>
The level’s background, the frames’ clear colour while it is loaded.
Sourcepub fn entities(&self) -> &[Entity]
pub fn entities(&self) -> &[Entity]
The entities the level spawned, its tall tiles’ then its prefabs’, which the next load despawns. Empty if none is loaded.
Sourcepub fn tile_layers(&self) -> &[TileLayerDraw]
pub fn tile_layers(&self) -> &[TileLayerDraw]
The level’s tile layers, in TileLayers, as the engine draws them
each frame, the first beneath. Empty if none is loaded.
Trait Implementations§
Source§impl Debug for CurrentLevel
impl Debug for CurrentLevel
Auto Trait Implementations§
impl Forget for CurrentLevel
impl Freeze for CurrentLevel
impl Move for CurrentLevel
impl RefUnwindSafe for CurrentLevel
impl Send for CurrentLevel
impl Sync for CurrentLevel
impl Unpin for CurrentLevel
impl UnsafeUnpin for CurrentLevel
impl UnwindSafe for CurrentLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more