13 lines
No EOL
388 B
Python
13 lines
No EOL
388 B
Python
from pathlib import Path
|
|
|
|
import pygame
|
|
|
|
# Einheitlichkeit: Wenn image_path ein Path-Objekt ist, sollte auch load_image ein Path-Objekt laden.
|
|
|
|
images_path = Path(__file__).resolve().parent.parent / "data" / "textures"
|
|
|
|
|
|
def load_image(path: str | Path) -> pygame.Surface:
|
|
# print(self.images_path)
|
|
# print(self.images_path / path)
|
|
return pygame.image.load(images_path / path) |