Last active
August 29, 2015 13:55
-
-
Save karl-zylinski/8772190 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let mut layers = ~[ | |
~GameLayer::new(&mut resource_store) as ~Layer:, | |
~GuiLayer::new() as ~Layer | |
]; | |
while window.is_open() { | |
let mut new_layers: ~[~Layer:] = ~[]; | |
for layer in layers.iter() { | |
let update_result = layer.update(dt, &input); | |
new_layers = vec::append(new_layers, update_result.new_layers); | |
layer.draw(&mut window); | |
} | |
layers = new_layers; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment