Game.light_radius durch Konstante LIGHT_RADIUS ersetzt.

This commit is contained in:
binaerverkehr 2026-09-26 13:25:13 +02:00
parent fd9018d0f1
commit 48cda170dd

View file

@ -3,6 +3,7 @@ import pygame
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
PLAYER_SIZE = 20
LIGHT_RADIUS = 75
class Game:
@ -28,7 +29,6 @@ class Game:
self.light_points: list[pygame.Vector2] = []
# Level
self.walls = [pygame.Rect(100, 100, 20, 50), pygame.Rect(300, 300, 200, 20), pygame.Rect(550, 80, 20, 200)]
self.light_radius = 75
def run(self) -> None:
while self.running:
@ -72,7 +72,7 @@ class Game:
"""RAYCASTING"""
ray_end = pygame.Vector2()
self.light_points = []
vector = pygame.Vector2(self.light_radius, 0)
vector = pygame.Vector2(LIGHT_RADIUS, 0)
# Lichtstrahlen berechnen
for i in range(360):