|
|
|
|
@ -19,7 +19,7 @@ class World:
|
|
|
|
|
self.bg_width = self.background.get_width()
|
|
|
|
|
|
|
|
|
|
# Boden
|
|
|
|
|
self.ground_rect = pygame.Rect(0, 650, 5000, 80) # Boden
|
|
|
|
|
self.ground_rect = pygame.Rect(0, 650, 5000 * 2.7, 80) # Boden
|
|
|
|
|
full_image = pygame.image.load(settings.world.ground.img).convert_alpha()
|
|
|
|
|
# --- Ausschneiden des Bereichs
|
|
|
|
|
cropped = pygame.Surface((settings.world.ground.crop_scale_right, settings.world.ground.crop_height), pygame.SRCALPHA)
|
|
|
|
|
@ -38,7 +38,7 @@ class World:
|
|
|
|
|
camera_offset = max(0, min(camera_offset, world_width - settings.SCREEN_WIDTH))
|
|
|
|
|
self.player.update(self.ground_rect.top, self.obstacles)
|
|
|
|
|
|
|
|
|
|
bg_offset = int(camera_offset * 0.5) # Parallax: langsamer bewegen
|
|
|
|
|
bg_offset = int(camera_offset * 0.3) # Parallax: langsamer bewegen
|
|
|
|
|
self.screen.blit(self.background, (-bg_offset, 0))
|
|
|
|
|
# Boden kacheln ohne Parallax
|
|
|
|
|
start_tile = (camera_offset // self.tile_width) * self.tile_width
|
|
|
|
|
|