pub struct FlowState { /* private fields */ }Expand description
The flow distinctions a per-game RunState re-derives, as one value.
Implementations§
Source§impl FlowState
impl FlowState
Sourcepub const CLOSED: FlowState
pub const CLOSED: FlowState
The front end with nothing running: what a game that has not installed the flow reads as, so a mis-wired frame freezes the game instead of running it behind a menu.
pub const fn new( flow: Flow, transition: Transition, suspension: Suspension, ) -> Self
Sourcepub fn from_world(world: &World) -> Option<Self>
pub fn from_world(world: &World) -> Option<Self>
Read the flow state sets out of a sim world.
None when install was never called, so a caller cannot mistake
“not wired” for Flow::Menu.
pub const fn flow(&self) -> Flow
pub const fn transition(&self) -> Transition
pub const fn suspension(&self) -> Suspension
The screen is the front end.
Sourcepub const fn modal(&self) -> bool
pub const fn modal(&self) -> bool
A blocking panel owns the screen: the pause panel or a game modal.
The condition the game’s own overlay and the ECS gameplay systems both gate on, so a modal owned by the sim cannot be half-drawn.
Sourcepub const fn transitional(&self) -> bool
pub const fn transitional(&self) -> bool
A wipe or curtain is running.
Sourcepub const fn run_live(&self) -> bool
pub const fn run_live(&self) -> bool
The world should advance this step: a live run, no transition, no suspend. The gameplay schedule’s gate.
Sourcepub const fn panel_owns_input(&self) -> bool
pub const fn panel_owns_input(&self) -> bool
A panel (menu, pause, modal) owns the screen.
Sourcepub const fn game_has_input(&self) -> bool
pub const fn game_has_input(&self) -> bool
The game answers sticks and buttons: a live run that is neither transitioning nor suspended.
The touch overlay’s gate.
pub const fn input_owner(&self) -> InputOwner
Trait Implementations§
impl Copy for FlowState
impl Eq for FlowState
impl StructuralPartialEq for FlowState
Auto Trait Implementations§
impl Freeze for FlowState
impl RefUnwindSafe for FlowState
impl Send for FlowState
impl Sync for FlowState
impl Unpin for FlowState
impl UnsafeUnpin for FlowState
impl UnwindSafe for FlowState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
self.