diff --git a/src/map.py b/src/map.py index 20420ff..eed245f 100644 --- a/src/map.py +++ b/src/map.py @@ -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: diff --git a/src/settings.py b/src/settings.py index fb68e0a..83378df 100644 --- a/src/settings.py +++ b/src/settings.py @@ -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 \ No newline at end of file diff --git a/src/tower.py b/src/tower.py index 8510dd5..ca79da4 100644 --- a/src/tower.py +++ b/src/tower.py @@ -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