fused settings
This commit is contained in:
+1
-16
@@ -1,21 +1,6 @@
|
|||||||
import pygame
|
import pygame
|
||||||
from src.desk import Desk
|
from src.desk import Desk
|
||||||
from src.settings import DESK_WIDTH, DESK_HEIGHT
|
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
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
class Map:
|
class Map:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from typing import Mapping, Literal, Tuple
|
from typing import Mapping, Literal, Tuple
|
||||||
|
|
||||||
from src.map import tile_size
|
from src.map import tile_size
|
||||||
|
from tower import projectile_size
|
||||||
|
|
||||||
# --- DESK ---
|
# --- DESK ---
|
||||||
DESK_WIDTH = 70
|
DESK_WIDTH = 70
|
||||||
@@ -74,6 +75,12 @@ PROJECTILE_DMG = 15
|
|||||||
PROJECTILE_SPEED = 7
|
PROJECTILE_SPEED = 7
|
||||||
COLOR_PROJECTILE = (200, 200, 0)
|
COLOR_PROJECTILE = (200, 200, 0)
|
||||||
TOWER_TIMER = 30000 # how long the tower stays and attack before it disappears
|
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 ---
|
# --- ITEM SPAWN TIMER ---
|
||||||
@@ -119,3 +126,20 @@ HUD_BAR_X = 150 # left startpoint for hp bars
|
|||||||
HUD_Y_DOOR = 20
|
HUD_Y_DOOR = 20
|
||||||
HUD_Y_ZOMBIE = 50
|
HUD_Y_ZOMBIE = 50
|
||||||
HUD_Y_ECTS = 85
|
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
@@ -3,7 +3,7 @@ from turtledemo.lindenmayer import draw
|
|||||||
import pygame
|
import pygame
|
||||||
import random
|
import random
|
||||||
import math
|
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
|
tower_size = 30 # Größe Tower Feld in Pixel
|
||||||
projectile_size = 8 # Größe Projektil in Pixel
|
projectile_size = 8 # Größe Projektil in Pixel
|
||||||
|
|||||||
Reference in New Issue
Block a user