pub struct App<State = ()>where
State: 'static,{
pub world: World,
pub schedule: Schedule,
pub input: Input,
pub record_mode: bool,
pub playback_file: Option<String>,
/* private fields */
}Fields§
§world: World§schedule: Schedule§input: Input§record_mode: bool§playback_file: Option<String>Implementations§
Source§impl<State> App<State>where
State: 'static,
impl<State> App<State>where
State: 'static,
pub fn new(title: &str, width: u32, height: u32) -> App<State>
pub fn set_runner<F>(self, f: F) -> App<State>
pub fn set_runner_mut<F>(&mut self, f: F)
pub fn start_recording(self) -> App<State>
pub fn start_playback(self, path: &str) -> App<State>
Sourcepub fn add_event<T>(self) -> App<State>
pub fn add_event<T>(self) -> App<State>
Sisteme yeni bir Olay (Event) türü kaydeder.
Bu işlem sayesinde her kare bitişinde çift-buffer update() otomatik çalışır.
pub fn with_icon(self, icon_bytes: &'static [u8]) -> App<State>
pub fn add_plugin<P>(self, plugin: P) -> App<State>where
P: Plugin<State>,
pub fn add_embedded_asset( self, path: &str, data: Cow<'static, [u8]>, ) -> App<State>
pub fn set_setup<F>(self, f: F) -> App<State>
pub fn set_update<F>(self, f: F) -> App<State>
pub fn set_render<F>(self, f: F) -> App<State>where
F: FnMut(&mut World, &State, &mut CommandEncoder, &TextureView, &mut Renderer, f32) + 'static,
Sourcepub fn set_simple_render<F>(self, f: F) -> App<State>
pub fn set_simple_render<F>(self, f: F) -> App<State>
Yeni, basit Render fonksiyonunu (RenderContext) ekler
pub fn set_input<F>(self, f: F) -> App<State>
pub fn set_ui<F>(self, f: F) -> App<State>
pub fn add_system<Params, S>(self, system: S) -> App<State>where
S: IntoSystemConfig<Params>,
pub fn configure_set(self, config: SetConfig) -> App<State>
pub fn load_scene(self, path: &str) -> App<State>
pub fn run(self)
Trait Implementations§
Source§impl SimpleAppExt for App<SimpleSceneState>
impl SimpleAppExt for App<SimpleSceneState>
fn with_simple_scene<F>(self, setup_fn: F) -> Self
Auto Trait Implementations§
impl<State> Freeze for App<State>
impl<State = ()> !RefUnwindSafe for App<State>
impl<State = ()> !Send for App<State>
impl<State = ()> !Sync for App<State>
impl<State> Unpin for App<State>
impl<State> UnsafeUnpin for App<State>
impl<State = ()> !UnwindSafe for App<State>
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
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>
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.Source§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.Source§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.Source§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.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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