school-horror-game/scripts/level.py

30 lines
733 B
Python

import pygame
from scripts.constants import *
from scripts.item import Item
class Level:
def __init__(self, game, items: list[Item], walls: list[pygame.Rect]):
self.game = game
# Items
self.items = items
# Level
self.walls = walls
def render(self, surface: pygame.Surface):
for y in range(ROWS):
for x in range(COLS):
surface.blit(
self.game.assets["floor_01"],
pygame.Rect(x * 64, y * 64, TILE_SIZE, TILE_SIZE),
)
# Wände
for wall in self.walls:
surface.blit(self.game.assets["wall"], wall)
def draw_walls(self, surface: pygame.Surface):
pass