fused settings

This commit is contained in:
Lukas Kammerhofer
2026-05-08 18:49:47 +02:00
parent 80f68682d9
commit cf6af54eb1
3 changed files with 26 additions and 17 deletions
+1 -16
View File
@@ -1,21 +1,6 @@
import pygame
from src.desk import Desk
from src.settings import DESK_WIDTH, DESK_HEIGHT
# Fenstergröße und Tile Größe (Felder)
tile_size = 30
screen_w = 1900
screen_h = 900
# Farben für die einzelnen Tiles
color_wall = (30, 20, 40) # black like
color_room = (75, 40, 55) # dark red-violet
color_hall = (35, 65, 45) # dark green
color_door = (40, 90, 110) # dark blue
color_void = (10, 10, 15) # a little more black
color_text = (220, 180, 210) # rose
color_border = (55, 35, 70)
color_start = (255, 0, 0)# dark violet
from src.settings import DESK_WIDTH, DESK_HEIGHT, tile_size, screen_w, screen_h, color_wall, color_room, color_hall, color_door, color_void, color_text, color_border, color_start
class Map:
+24
View File
@@ -1,6 +1,7 @@
from typing import Mapping, Literal, Tuple
from src.map import tile_size
from tower import projectile_size
# --- DESK ---
DESK_WIDTH = 70
@@ -74,6 +75,12 @@ PROJECTILE_DMG = 15
PROJECTILE_SPEED = 7
COLOR_PROJECTILE = (200, 200, 0)
TOWER_TIMER = 30000 # how long the tower stays and attack before it disappears
tower_size = 30
projectile_size = 8
fire_interval = 1000 # ms
respawn_delay = 10000 # ms
# --- ITEM SPAWN TIMER ---
@@ -119,3 +126,20 @@ HUD_BAR_X = 150 # left startpoint for hp bars
HUD_Y_DOOR = 20
HUD_Y_ZOMBIE = 50
HUD_Y_ECTS = 85
# --- MAP ---
# Fenstergröße und Tile Größe (Felder)
tile_size = 30
screen_w = 1900
screen_h = 900
# Farben für die einzelnen Tiles
color_wall = (30, 20, 40) # black like
color_room = (75, 40, 55) # dark red-violet
color_hall = (35, 65, 45) # dark green
color_door = (40, 90, 110) # dark blue
color_void = (10, 10, 15) # a little more black
color_text = (220, 180, 210) # rose
color_border = (55, 35, 70)
color_start = (255, 0, 0)# dark violet
+1 -1
View File
@@ -3,7 +3,7 @@ from turtledemo.lindenmayer import draw
import pygame
import random
import math
from src.settings import TOWER_COST, PROJECTILE_DMG, PROJECTILE_SPEED, COLOR_PROJECTILE, TOWER_TIMER
from src.settings import TOWER_COST, PROJECTILE_DMG, PROJECTILE_SPEED, COLOR_PROJECTILE, TOWER_TIMER, projectile_size, tower_size, fire_interval, respawn_delay
tower_size = 30 # Größe Tower Feld in Pixel
projectile_size = 8 # Größe Projektil in Pixel