cdec/settings.py
2025-10-12 08:54:30 +02:00

26 lines
567 B
Python

import pygame
# Globale Einstellungen für das Spiel
MAP_PATH = "geodata/s2_2025.tif"
WIDTH = 800
HEIGHT = 600
MINIMAP_MARGIN = 20
PLAYER_SIZE = 40
PLAYER_SPEED = 5
WATER_SIZE = 10
WATER_SPEED = 10
KILL_RADIUS = 30
PLAYER_IMG_PATH = "images/player.png"
ENEMY_IMG_PATH = "images/enemy.png"
HUMAN_IMG_PATH = "images/human.png"
def load_img(path, size):
try:
img = pygame.image.load(path).convert_alpha()
return pygame.transform.scale(img, size)
except Exception as e:
print(f"Error loading image '{path}': {e}")
return None