[−][src]Struct amethyst_test::FunctionState
Runs a function in .update()
then Pop
s itself.
The function is run before GameUpdate#update(world)
is called.
Methods
impl<F> FunctionState<F> where
F: Fn(&mut World),
[src]
F: Fn(&mut World),
Trait Implementations
impl<F: Debug> Debug for FunctionState<F> where
F: Fn(&mut World),
[src]
F: Fn(&mut World),
impl<F, T, E> State<T, E> for FunctionState<F> where
F: Fn(&mut World),
T: GameUpdate,
E: Send + Sync + 'static,
[src]
F: Fn(&mut World),
T: GameUpdate,
E: Send + Sync + 'static,
fn update(&mut self, data: StateData<T>) -> Trans<T, E>
[src]
fn on_start(&mut self, _data: StateData<T>)
[src]
Executed when the game state begins.
fn on_stop(&mut self, _data: StateData<T>)
[src]
Executed when the game state exits.
fn on_pause(&mut self, _data: StateData<T>)
[src]
Executed when a different game state is pushed onto the stack.
fn on_resume(&mut self, _data: StateData<T>)
[src]
Executed when the application returns to this game state once again.
fn handle_event(&mut self, _data: StateData<T>, _event: E) -> Trans<T, E>
[src]
Executed on every frame before updating, for use in reacting to events.
fn fixed_update(&mut self, _data: StateData<T>) -> Trans<T, E>
[src]
Executed repeatedly at stable, predictable intervals (1/60th of a second by default), if this is the active state. Read more
fn shadow_fixed_update(&mut self, _data: StateData<T>)
[src]
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. Read more
fn shadow_update(&mut self, _data: StateData<T>)
[src]
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. Read more
Auto Trait Implementations
impl<F> Send for FunctionState<F> where
F: Send,
F: Send,
impl<F> Sync for FunctionState<F> where
F: Sync,
F: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> State for T where
T: SimpleState,
[src]
T: SimpleState,
fn on_start(&mut self, data: StateData<GameData>)
[src]
Executed when the game state begins.
fn on_stop(&mut self, data: StateData<GameData>)
[src]
Executed when the game state exits.
fn on_pause(&mut self, data: StateData<GameData>)
[src]
Executed when a different game state is pushed onto the stack.
fn on_resume(&mut self, data: StateData<GameData>)
[src]
Executed when the application returns to this game state once again.
fn handle_event(
&mut self,
data: StateData<GameData>,
event: StateEvent
) -> Trans<GameData<'static, 'static>, StateEvent>
[src]
&mut self,
data: StateData<GameData>,
event: StateEvent
) -> Trans<GameData<'static, 'static>, StateEvent>
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>
[src]
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent>
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>
[src]
&mut self,
data: StateData<GameData>
) -> Trans<GameData<'static, 'static>, StateEvent>
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>)
[src]
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>)
[src]
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<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf 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> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> Erased for T
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Erased for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.