Merge branch 'feat/tower' into 'main'
feat: fused settings See merge request swd25-bootcamp/silent-fh!29
This commit is contained in:
+1
-15
@@ -1,20 +1,6 @@
|
|||||||
import pygame
|
import pygame
|
||||||
from src.desk import Desk
|
from src.desk import Desk
|
||||||
from src.settings import DESK_WIDTH, DESK_HEIGHT, tile_size
|
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
|
|
||||||
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:
|
||||||
|
|||||||
@@ -75,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 ---
|
||||||
@@ -121,6 +127,22 @@ 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
|
||||||
|
=======
|
||||||
# --- HIGHSCORE ---
|
# --- HIGHSCORE ---
|
||||||
HIGHSCORE_COLOR_FONT = (0, 0, 0)
|
HIGHSCORE_COLOR_FONT = (0, 0, 0)
|
||||||
HIGHSCORE_COLOR_TABLE = (150, 255, 0)
|
HIGHSCORE_COLOR_TABLE = (150, 255, 0)
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
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