add some settings for the sprite assets
This commit is contained in:
@@ -1,4 +1,24 @@
|
|||||||
# --- DESK ---
|
# --- DESK ---
|
||||||
|
from typing import Mapping, Literal, Tuple
|
||||||
|
|
||||||
DESK_WIDTH = 70
|
DESK_WIDTH = 70
|
||||||
DESK_HEIGHT = 40
|
DESK_HEIGHT = 40
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user