def die(self): ''' ''' super().die() Screen.load_screen(DeathScreen(Screen.get_current_screen())) sound_manager.play_effect('player_death')
def update(self, delta_time): ''' ''' super().update(delta_time) if event_handler.is_key_pressed(pygame.K_RETURN): Screen.load_screen(GameScreen())
def update(self, delta_time): ''' ''' super().update(delta_time) if event_handler.is_key_pressed(pygame.K_RETURN): Screen.get_last_screen().load_content() Screen.load_screen(Screen.get_last_screen())
pygame.init() # Initialize the game window utils.window = pygame.display.set_mode( (utils.window_size[0], utils.window_size[1])) pygame.display.set_caption('Zombie Shooter 3000') # Icon #icon = pygame.image.load('content/sprites/icon.png') #pygame.display.set_icon(icon) # Used font for txt #config.font = pygame.font.SysFont('Tahoma',18, True, False) # set the current screen to Screen.load_screen(LoadScreen()) Screen.load_screen(MenuScreen()) # clock is used to get a framerate of 60fps clock = pygame.time.Clock() def main() -> None: ''' The main function of the program that contains the gameLoop ''' # ---------------------- GameLoop while not utils.quit_game: # --------------------UPDATE-------------------- event_handler.update()