[−][src]Struct rust_action_heroes::state::loading::LoadingState
Handles loading level files and the sprite sheet.
It could also handle loading audio, but it doesn't.
on_start
method starts loading items, update
transitions to menu
state once all(ish)
assets are loaded.
Fields
sprite_sheet_progress: ProgressCounter
sprite_sheet_handle: Option<Handle<SpriteSheet>>
Implementations
impl LoadingState
[src]
fn load_level(
&self,
loader: &Loader,
storage: &AssetStorage<GameLevel>,
path: PathBuf
) -> Option<(Handle<GameLevel>, ProgressCounter)>
[src]
&self,
loader: &Loader,
storage: &AssetStorage<GameLevel>,
path: PathBuf
) -> Option<(Handle<GameLevel>, ProgressCounter)>
Loads a specific level; returns the handle and progress.
fn load_levels(
&self,
loader: &Loader,
storage: &AssetStorage<GameLevel>,
dir_list: Vec<PathBuf>
) -> (Vec<Handle<GameLevel>>, Vec<ProgressCounter>)
[src]
&self,
loader: &Loader,
storage: &AssetStorage<GameLevel>,
dir_list: Vec<PathBuf>
) -> (Vec<Handle<GameLevel>>, Vec<ProgressCounter>)
Given a list of file paths, loads files and their progresses.
fn find_levels(&self, dir_list: ReadDir) -> Vec<PathBuf>
[src]
Finds all the levels we have in assets/levels/*.level
fn load_sprite_sheet(
&self,
world: &mut World
) -> (Handle<SpriteSheet>, ProgressCounter)
[src]
&self,
world: &mut World
) -> (Handle<SpriteSheet>, ProgressCounter)
Load the sprite sheet so we can pass the handle around.
Trait Implementations
impl Default for LoadingState
[src]
fn default() -> LoadingState
[src]
impl SimpleState for LoadingState
[src]
fn on_start(&mut self, data: StateData<GameData>)
[src]
fn update(&mut self, _state_data: &mut StateData<GameData>) -> SimpleTrans
[src]
fn on_stop(&mut self, _data: StateData<GameData>)
fn on_pause(&mut self, _data: StateData<GameData>)
fn on_resume(&mut self, _data: StateData<GameData>)
fn handle_event(
&mut self,
_data: StateData<GameData>,
event: StateEvent<StringBindings>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
&mut self,
_data: StateData<GameData>,
event: StateEvent<StringBindings>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
fn fixed_update(
&mut self,
_data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
&mut self,
_data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
fn shadow_fixed_update(&mut self, _data: StateData<GameData>)
fn shadow_update(&mut self, _data: StateData<GameData>)
Auto Trait Implementations
impl !RefUnwindSafe for LoadingState
impl Send for LoadingState
impl Sync for LoadingState
impl Unpin for LoadingState
impl !UnwindSafe for LoadingState
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> State<GameData<'static, 'static>, StateEvent<StringBindings>> for T where
T: SimpleState,
T: SimpleState,
fn on_start(&mut self, data: StateData<GameData>)
Executed when the game state begins.
fn on_stop(&mut self, data: StateData<GameData>)
Executed when the game state exits.
fn on_pause(&mut self, data: StateData<GameData>)
Executed when a different game state is pushed onto the stack.
fn on_resume(&mut self, data: StateData<GameData>)
Executed when the application returns to this game state once again.
fn handle_event(
&mut self,
data: StateData<GameData>,
event: StateEvent<StringBindings>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
&mut self,
data: StateData<GameData>,
event: StateEvent<StringBindings>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
Executed on every frame before updating, for use in reacting to events.
fn fixed_update(
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
Executed repeatedly at stable, predictable intervals (1/60th of a second by default).
fn update(
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent<StringBindings>>
Executed on every frame immediately, as fast as the engine will allow (taking into account the frame rate limit).
fn shadow_fixed_update(&mut self, data: StateData<GameData>)
Executed repeatedly at stable, predictable intervals (1/60th of a second by default), even when this is not the active state, as long as this state is on the StateMachine's state-stack.
fn shadow_update(&mut self, data: StateData<GameData>)
Executed on every frame immediately, as fast as the engine will allow (taking into account the frame rate limit), even when this is not the active state, as long as this state is on the StateMachine's state-stack.
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Supports<T> for T
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,