(&mut self, _delta: f64)
| 22 | } |
| 23 | |
| 24 | fn physics_process(&mut self, _delta: f64) { |
| 25 | let mut velocity = self.base_mut().get_velocity(); |
| 26 | velocity = self.apply_gravity(velocity); |
| 27 | velocity = self.apply_controls(velocity); |
| 28 | |
| 29 | let mut base = self.base_mut(); |
| 30 | if let Some(c) = base.move_and_collide(velocity) { |
| 31 | velocity = velocity.slide(c.get_normal()); |
| 32 | base.emit_signal("on_player_did_collide", &[]); |
| 33 | } |
| 34 | |
| 35 | base.move_and_collide(velocity); |
| 36 | } |
| 37 | |
| 38 | fn input(&mut self, _event: Gd<InputEvent>) { |
| 39 | self.keys.iter().for_each(|k| { |
nothing calls this directly
no test coverage detected