Merge branch 'main' into feat/endscreen
This commit is contained in:
+32
-2
@@ -1,8 +1,11 @@
|
||||
# --- DESK ---
|
||||
from typing import Mapping, Literal, Tuple
|
||||
|
||||
from src.map import tile_size
|
||||
|
||||
DESK_WIDTH = 70
|
||||
DESK_HEIGHT = 40
|
||||
|
||||
|
||||
# --- DOOR ---
|
||||
DOOR_WIDTH = 20
|
||||
DOOR_HEIGHT = 100
|
||||
@@ -13,6 +16,22 @@ COLOR_DOOR_BORDER = (100, 90, 80)
|
||||
COLOR_HP_BAR_GREEN = (0, 255, 0)
|
||||
COLOR_HP_BAR_BG = (50, 50, 50)
|
||||
|
||||
# Players Constants / Settings
|
||||
# Valid movement/animation directions.
|
||||
Direction = Literal["down", "left", "right", "up"]
|
||||
|
||||
# Sprite files are grouped by direction.
|
||||
# Example: "down" uses sprite_01.png, sprite_02.png, sprite_03.png.
|
||||
DIRECTION_FRAMES: Mapping[Direction, Tuple[int, int, int]] = {
|
||||
"down": (1, 2, 3),
|
||||
"left": (4, 5, 6),
|
||||
"right": (7, 8, 9),
|
||||
"up": (10, 11, 12),
|
||||
}
|
||||
|
||||
# Default drawing size and animation speed.
|
||||
DEFAULT_SPRITE_HEIGHT: int = 138
|
||||
DEFAULT_FRAME_TIME: float = 0.16
|
||||
|
||||
# --- ECTS ---
|
||||
START_ECTS_VALUE = 1 # how many ECTS are generated at the beginning
|
||||
@@ -78,4 +97,15 @@ COLOR_HP_BAR_RED = (200, 0, 0)
|
||||
COLOR_HP_BAR_YELLOW = (255, 255, 0)
|
||||
|
||||
HUD_BAR_WIDTH = 100
|
||||
HUD_BAR_HEIGHT = 15
|
||||
HUD_BAR_HEIGHT = 15
|
||||
|
||||
PLAYER_SPEED = 180.0
|
||||
DEMO_ACTOR_HEIGHT = tile_size * 3
|
||||
FPS = 60
|
||||
|
||||
HUD_X_OFFSET = 20 # left startpoint for texts
|
||||
HUD_BAR_X = 150 # left startpoint for hp bars
|
||||
|
||||
HUD_Y_DOOR = 20
|
||||
HUD_Y_ZOMBIE = 50
|
||||
HUD_Y_ECTS = 85
|
||||
|
||||
Reference in New Issue
Block a user