Retrieves the actors for Hero and Map modes and updates de HUD based on that
(self, clock)
| 1024 | self.spawned_hero = self.hero_actor |
| 1025 | |
| 1026 | def tick(self, clock): |
| 1027 | """Retrieves the actors for Hero and Map modes and updates de HUD based on that""" |
| 1028 | actors = self.world.get_actors() |
| 1029 | |
| 1030 | # We store the transforms also so that we avoid having transforms of |
| 1031 | # previous tick and current tick when rendering them. |
| 1032 | self.actors_with_transforms = [(actor, actor.get_transform()) for actor in actors] |
| 1033 | if self.hero_actor is not None: |
| 1034 | self.hero_transform = self.hero_actor.get_transform() |
| 1035 | |
| 1036 | self.update_hud_info(clock) |
| 1037 | |
| 1038 | def update_hud_info(self, clock): |
| 1039 | """Updates the HUD info regarding simulation, hero mode and whether there is a traffic light affecting the hero actor""" |
no test coverage detected