(title: &str, width: i32, height: i32, tick_rate: f64)
| 30 | |
| 31 | impl App { |
| 32 | pub fn new(title: &str, width: i32, height: i32, tick_rate: f64) -> App { |
| 33 | let mut window = Window::new(title, width, height); |
| 34 | let gfx = Graphics::new(&mut window); |
| 35 | let input = Input::new(); |
| 36 | let timer = Timer::new(tick_rate); |
| 37 | |
| 38 | App { |
| 39 | window, |
| 40 | gfx, |
| 41 | input, |
| 42 | timer, |
| 43 | |
| 44 | is_running: true, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | pub fn run(&mut self, event_handler: &mut impl EventHandler) { |
| 49 | self.timer.reset(); |
nothing calls this directly
no outgoing calls
no test coverage detected