MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / tick

Method tick

PythonAPI/examples/no_rendering_mode.py:1026–1036  ·  view source on GitHub ↗

Retrieves the actors for Hero and Map modes and updates de HUD based on that

(self, clock)

Source from the content-addressed store, hash-verified

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"""

Callers 1

game_loopFunction · 0.95

Calls 1

update_hud_infoMethod · 0.95

Tested by

no test coverage detected