Update lib.rs
This commit is contained in:
parent
ef5eaa68e9
commit
9ca9d834d9
1 changed files with 9 additions and 3 deletions
|
@ -3,6 +3,8 @@
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate sdl2;
|
extern crate sdl2;
|
||||||
|
|
||||||
|
use dispatcher::Dispatcher;
|
||||||
|
|
||||||
pub mod dispatcher;
|
pub mod dispatcher;
|
||||||
pub mod action;
|
pub mod action;
|
||||||
pub mod store;
|
pub mod store;
|
||||||
|
@ -18,8 +20,12 @@ pub mod scene_manager;
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
/// "Front-end"-function of the dispatcher
|
/// "Front-end"-function of the dispatcher
|
||||||
pub fn game_loop<'a>(disp: &'a mut dispatcher::Dispatcher<'a>, store_refs: Vec<&'a mut store::Store<'a>>) {
|
pub fn game_loop<'a>(mut disp: & mut dispatcher::Dispatcher<'a>, store_refs: Vec<&'a mut store::Store<'a>>) { //todo: HMM
|
||||||
|
|
||||||
disp.enter_refs(store_refs);
|
disp.enter_refs(store_refs);
|
||||||
|
|
||||||
while disp.dispatch() {};
|
while disp.dispatch() {};
|
||||||
|
|
||||||
|
disp.drop_refs();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue