[][src]Struct pixel_engine::Engine

pub struct Engine {
    pub title: String,
    pub size: (u32, u32, u32),
    pub elapsed: f64,
    pub screen: Screen,
    // some fields omitted
}

Bone of the Engine, join everything;

Fields

title: String

Main title of the window, Window's full title will be "Title - fps"

size: (u32, u32, u32)

Size of the window, with (x-size,y-size,pixel-size)

elapsed: f64

Time between current frame and last frame, usefull for movement's calculations

screen: Screen

Game's screen manager, let you draw on the screen

Implementations

impl Engine[src]

pub fn get_key(&self, keycode: Keycodes) -> Input[src]

Get The status of a key

pub fn get_mouse_btn(&self, btn: MouseBtn) -> Input[src]

Get the status of a Mouse Button

pub fn get_mouse_location(&self) -> (u32, u32)[src]

Get the mouse location (in pixel) on the screen Will be defaulted to (0,0) at the start of the program

pub fn get_mouse_wheel(&self) -> MouseWheel[src]

Get the scroll wheel direction (If Any) during the frame

pub fn get_pressed(&self) -> HashSet<Keycodes>[src]

Get all Keys pressed during the last frame

Trait Implementations

impl Debug for Engine[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.