Assets freigegeben
1
.gitignore
vendored
|
|
@ -221,4 +221,3 @@ __marimo__/
|
||||||
|
|
||||||
|
|
||||||
rechner.py
|
rechner.py
|
||||||
data/
|
|
||||||
BIN
data/textures/Assets/A4.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
data/textures/Assets/A5.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
data/textures/Assets/Inside_C.png
Normal file
|
After Width: | Height: | Size: 143 KiB |
BIN
data/textures/Assets/Inside_D.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
data/textures/Assets/Inside_E.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
data/textures/entity/player/player.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
data/textures/level/ground/floor_1.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
8
game.py
|
|
@ -229,12 +229,16 @@ class Taschenlampe:
|
||||||
surface.blit(self.light_surface, (0, 0))
|
surface.blit(self.light_surface, (0, 0))
|
||||||
light_mask = pygame.mask.from_surface(self.light_surface)
|
light_mask = pygame.mask.from_surface(self.light_surface)
|
||||||
|
|
||||||
if light_mask.overlap(self.game.test_item_mask, self.game.test_item.rect.topleft) is not None:
|
if (
|
||||||
|
light_mask.overlap(
|
||||||
|
self.game.test_item_mask, self.game.test_item.rect.topleft
|
||||||
|
)
|
||||||
|
is not None
|
||||||
|
):
|
||||||
self.render_item = True
|
self.render_item = True
|
||||||
else:
|
else:
|
||||||
self.render_item = False
|
self.render_item = False
|
||||||
|
|
||||||
|
|
||||||
# Item zeichnen, wenn Masken sich überlappen
|
# Item zeichnen, wenn Masken sich überlappen
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import math
|
|
||||||
|
|
||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
|
|
|
||||||