Beispiel #1
0
 def run(self):
     clock = pygame.time.Clock()
     surface = pygame.display.get_surface()
     render_system.add(self, layer=LayerTypes.UI_LAYER)
     
     while not self.stop:
         self.handle_events()
         self.handle_updates(surface)
         
         pygame.display.flip()
         clock.tick(ModalWindow.FPS)
     
     self.kill()
Beispiel #2
0
 def on_start(self):
     self.map = MapGenerator().generate()
     self.game_state = Controller(self.map)
     
     self.map_sprite = MapSprite(800, 600, self.map)
     self.sidebar_panel = SidebarPanel(800, 600)
     self.notification_panel = NotificationPanel(800, 600)
     render_system.add(self.map_sprite, layer=LayerTypes.MAP_LAYER)
     render_system.add(self.sidebar_panel, layer=LayerTypes.HUD_LAYER)
     render_system.add(self.notification_panel, layer=LayerTypes.HUD_LAYER)