|
|
|
@ -104,25 +104,20 @@ class World:
|
|
|
|
|
|
|
|
|
|
|
|
# PLAYER
|
|
|
|
# PLAYER
|
|
|
|
self.screen.blit(self.player.image, (player_screen_x, self.player.rect.y))
|
|
|
|
self.screen.blit(self.player.image, (player_screen_x, self.player.rect.y))
|
|
|
|
|
|
|
|
|
|
|
|
# ANZEIGE
|
|
|
|
|
|
|
|
font = pygame.font.Font(settings.fonts.PressStart2P, 24)
|
|
|
|
font = pygame.font.Font(settings.fonts.PressStart2P, 24)
|
|
|
|
name_surface = font.render(self.player_name, True, (255, 255, 255))
|
|
|
|
name_surface = font.render(self.player_name, True, (255, 255, 255))
|
|
|
|
self.screen.blit(name_surface, (20, 20))
|
|
|
|
self.screen.blit(name_surface, (20, 20))
|
|
|
|
|
|
|
|
|
|
|
|
# KNOCHENBRÜCHE
|
|
|
|
|
|
|
|
bones_text = font.render(f"Schaden: {self.player.broken_bones}", True, (255, 255, 255))
|
|
|
|
|
|
|
|
self.screen.blit(bones_text, (20, 60))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
current_ticks = pygame.time.get_ticks()
|
|
|
|
current_ticks = pygame.time.get_ticks()
|
|
|
|
elapsed_seconds = (current_ticks - self.start_ticks) // 1000
|
|
|
|
elapsed_seconds = (current_ticks - self.start_ticks) // 1000
|
|
|
|
|
|
|
|
|
|
|
|
if not self.level_started:
|
|
|
|
if not self.level_started:
|
|
|
|
countdown = max(0, settings.world.countdown - elapsed_seconds)
|
|
|
|
countdown = max(0, settings.world.countdown - elapsed_seconds)
|
|
|
|
|
|
|
|
|
|
|
|
font = pygame.font.Font(settings.fonts.PressStart2P, 90)
|
|
|
|
font = pygame.font.Font(settings.fonts.PressStart2P, 72)
|
|
|
|
if countdown > 0:
|
|
|
|
if countdown > 0:
|
|
|
|
countdown_surface = font.render(str(countdown), True, settings.MyColors.yellow)
|
|
|
|
countdown_surface = font.render(str(countdown), True, (255, 255, 255))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
countdown_surface = font.render("GO!", True, (0, 255, 0))
|
|
|
|
countdown_surface = font.render("GO!", True, (0, 255, 0))
|
|
|
|
|
|
|
|
|
|
|
|
|