Parses the input, which is classified in keyboard events and mouse
(self, clock)
| 1481 | self.mouse_pos = (x, y) |
| 1482 | |
| 1483 | def parse_input(self, clock): |
| 1484 | """Parses the input, which is classified in keyboard events and mouse""" |
| 1485 | self._parse_events() |
| 1486 | self._parse_mouse() |
| 1487 | if not self._autopilot_enabled: |
| 1488 | if isinstance(self.control, carla.VehicleControl): |
| 1489 | self._parse_keys(clock.get_time()) |
| 1490 | self.control.reverse = self.control.gear < 0 |
| 1491 | if (self._world.hero_actor is not None): |
| 1492 | self._world.hero_actor.apply_control(self.control) |
| 1493 | |
| 1494 | @staticmethod |
| 1495 | def _is_quit_shortcut(key): |
no test coverage detected