The generic event handler for the game. You should implement this yourself ## Call order: 1. `event`: 0 to n times based on what events are received 2. `update`: 0 to n times based on the tick rate 3. `draw`: 1 time per frame
| 10 | /// 2. `update`: 0 to n times based on the tick rate |
| 11 | /// 3. `draw`: 1 time per frame |
| 12 | pub trait EventHandler { |
| 13 | /// Handle a raw event for the game. This is useful for one-off events, like key down events. |
| 14 | /// For continuous events, like moving a character when you hold a key, use the update method. |
| 15 | /// |
| 16 | /// note: this will be called after the `app.input` has been updated with the event. |
| 17 | fn event(&mut self, _app: &mut App, _event: Event) {} |
| 18 | fn update(&mut self, _app: &mut App) {} |
| 19 | fn draw(&mut self, _app: &mut App) {} |
| 20 | } |
| 21 | |
| 22 | pub struct App { |
| 23 | pub window: Window, |
no outgoing calls
no test coverage detected