Struct oxygengine::prelude::AppLifeCycle
source · pub struct AppLifeCycle {
pub running: bool,
pub delta_time_limit: Option<Duration>,
/* private fields */
}
Fields§
§running: bool
§delta_time_limit: Option<Duration>
Implementations§
source§impl AppLifeCycle
impl AppLifeCycle
pub fn new(timer: Box<dyn AppTimer, Global>) -> AppLifeCycle
pub fn with_limit( timer: Box<dyn AppTimer, Global>, delta_time_limit: Option<Duration> ) -> AppLifeCycle
pub fn time(&self) -> Duration
pub fn time_seconds(&self) -> f32
pub fn delta_time(&self) -> Duration
pub fn delta_time_seconds(&self) -> f32
pub fn ticks(&self) -> usize
pub fn current_state_token(&self) -> ID<PhantomData<dyn State + Send + Sync>>
Trait Implementations§
source§impl<AT> From<(AT, Duration)> for AppLifeCyclewhere
AT: AppTimer + 'static,
impl<AT> From<(AT, Duration)> for AppLifeCyclewhere AT: AppTimer + 'static,
source§fn from(_: (AT, Duration)) -> AppLifeCycle
fn from(_: (AT, Duration)) -> AppLifeCycle
Converts to this type from the input type.
source§impl<AT> From<AT> for AppLifeCyclewhere
AT: AppTimer + 'static,
impl<AT> From<AT> for AppLifeCyclewhere AT: AppTimer + 'static,
source§fn from(timer: AT) -> AppLifeCycle
fn from(timer: AT) -> AppLifeCycle
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AppLifeCycle
impl Send for AppLifeCycle
impl Sync for AppLifeCycle
impl Unpin for AppLifeCycle
impl !UnwindSafe for AppLifeCycle
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