[][src]Struct mief::application::Application

pub struct Application {
    assets: PathBuf,
    window: PistonWindow,
    field: Field,
    scoreboard: Scoreboard,
    fps_counter: FPSCounter,
}

The manager of the application logic.

Fields

assets: PathBuf

Path to the folder containing the assets.

window: PistonWindow

The application window.

field: Field

The playing field.

scoreboard: Scoreboard

The scoreboard.

fps_counter: FPSCounter

The FPS counter.

Methods

impl Application[src]

pub fn new() -> Result<Application, Error>[src]

Initialize a new application.

Returns an error if the PistonWindow cannot be initialized.

fn on_button_change(&mut self, button_arguments: ButtonArgs)[src]

Handle button events.

fn on_button_pressed(&mut self, button: Button)[src]

Handle button press events.

fn on_button_released(&mut self, button: Button)[src]

Handle button release events.

fn on_render(&mut self, event: &Event, _render_arguments: &RenderArgs)[src]

Render the entire application.

fn on_resize(&mut self, new_width: u32, new_height: u32)[src]

Resize the application.

fn on_update(&mut self, update_arguments: &UpdateArgs)[src]

Update the application state.

pub fn run(&mut self)[src]

Run the application.