update piston-window
This commit is contained in:
parent
0738c7a15f
commit
dd6a65d843
1603
Cargo.lock
generated
1603
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -4,4 +4,4 @@ version = "0.1.0"
|
|||
authors = ["Fabien Freling <public@ffreling.com>"]
|
||||
|
||||
[dependencies]
|
||||
piston_window = "0.70.0"
|
||||
piston_window = "0.107.0"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
extern crate piston_window;
|
||||
|
||||
use piston_window::*;
|
||||
use std::f64::consts;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
extern crate piston_window;
|
||||
|
||||
use piston_window::*;
|
||||
mod engine;
|
||||
|
||||
|
@ -13,7 +12,8 @@ fn main() {
|
|||
WindowSettings::new("Rustenstein", [640, 480])
|
||||
.exit_on_esc(true)
|
||||
.resizable(false)
|
||||
.build().unwrap();
|
||||
.build()
|
||||
.unwrap_or_else(|e| { panic!("Failed to build PistonWindow: {}", e) });
|
||||
|
||||
let level: [Tile; 5 * 5] = [
|
||||
Tile::Wall, Tile::Wall, Tile::Wall, Tile::Wall, Tile::Wall,
|
||||
|
@ -26,7 +26,7 @@ fn main() {
|
|||
let mut engine = engine::Engine::new(window.size());
|
||||
|
||||
while let Some(event) = window.next() {
|
||||
window.draw_2d(&event, |context, graphics| {
|
||||
window.draw_2d(&event, |context, graphics, device| {
|
||||
engine.render(context, graphics);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue