pub struct Engine;
Expand description
Engine: wrapper around direct layers.
Implementations§
source§impl Engine
impl Engine
sourcepub const DELTA_TIME: f32 = 0.0166666675f32
pub const DELTA_TIME: f32 = 0.0166666675f32
Delta time.
sourcepub fn set_frame_skip(value: u32)
pub fn set_frame_skip(value: u32)
Set frame skip.
Set to 0 to unset.
sourcepub fn run_frame<F: Fn(FrameContext)>(func: F)
pub fn run_frame<F: Fn(FrameContext)>(func: F)
Execute code for a frame.
You need to execute your game logic in the func
closure
to benefit from the gamepad and mouse book-keeping, plus
the frame skip.
sourcepub fn frame_count() -> u64
pub fn frame_count() -> u64
Get the current frame count.
sourcepub fn frame_skipped() -> u32
pub fn frame_skipped() -> u32
Get the frame skip value.
sourcepub fn draw_colors() -> SystemDrawColors
pub fn draw_colors() -> SystemDrawColors
Get the global draw colors.
Auto Trait Implementations§
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnwindSafe for Engine
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