pub struct PlaySession { /* private fields */ }Implementations§
Source§impl PlaySession
impl PlaySession
pub fn play( scene: &Scene, staged: &Staged, game: Box<dyn Game>, ) -> Result<Self, PlayError>
pub fn play_with( scene: &Scene, staged: Option<&Staged>, game: Box<dyn Game>, options: Options, ) -> Result<Self, PlayError>
pub fn play_hooked( scene: &Scene, staged: Option<&Staged>, game: Box<dyn Game>, options: Options, hooks: Box<dyn PlayHooks>, ) -> Result<Self, PlayError>
pub fn set_frame_stats(&mut self, stats: FrameStats)
pub fn advance(&mut self, real_seconds: f32) -> Tick
pub fn step(&mut self) -> bool
pub fn edit(&mut self, edit: Edit) -> Result<(), String>
pub fn edits(&self) -> &[Stamped]
pub fn pending(&self) -> &Pending
pub fn pause(&mut self)
pub fn resume(&mut self)
pub fn paused(&self) -> bool
pub fn feed(&mut self, event: InputEvent)
pub fn input(&self) -> &Input
pub fn recording(&self) -> Option<&Recording>
pub fn take_motors(&mut self) -> Vec<MotorCommand>
pub fn set_rumble_intensity(&mut self, percent: u8)
pub fn set_bindings(&mut self, map: BindingMap)
pub fn set_viewport(&mut self, viewport: Option<Viewport>)
pub fn game(&self) -> &dyn Game
pub fn game_mut(&mut self) -> &mut dyn Game
pub fn ui(&mut self, frame: &UiFrame) -> Ui
pub fn exit(&self) -> Option<&Exit>
pub fn set_display(&mut self, display: &DisplaySettings)
pub fn take_recording(&mut self) -> Option<Recording>
pub fn queue(&mut self, reload: Result<Reload, SceneError>)
pub fn queued(&self) -> Option<&Scene>
pub fn snapshot(&self) -> &Scene
pub fn world(&self) -> &World
pub fn world_mut(&mut self) -> &mut World
pub fn take_audio(&mut self) -> Vec<f32>
pub fn time(&self) -> f32
pub fn present<'a>( &'a mut self, staged: &'a Staged, renderer: &mut Renderer, aspect: f32, seed: u32, ) -> Result<PlayFrame<'a>, PlayError>
pub fn hud(&self) -> &Hud
pub fn hud_mut(&mut self) -> &mut Hud
pub fn draw_hud_on( &mut self, renderer: &mut Renderer, output: &TextureView, format: TextureFormat, size: [u32; 2], )
pub fn stop(self) -> Stopped
Auto Trait Implementations§
impl !Freeze for PlaySession
impl !RefUnwindSafe for PlaySession
impl !Send for PlaySession
impl !Sync for PlaySession
impl Unpin for PlaySession
impl UnsafeUnpin for PlaySession
impl !UnwindSafe for PlaySession
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.