Temporary level change

This commit is contained in:
Michał Gdula 2023-01-28 18:28:41 +00:00
parent a32720cedb
commit 41a0ec665b
26 changed files with 81 additions and 28 deletions

7
npc.py
View file

@ -138,7 +138,10 @@ class NPC(AnimatedSprite):
return False
def draw_ray_cast(self):
pg.draw.circle(self.game.screen, 'red', (100 * self.x, 100 * self.y), 15)
if self.dist < self.attack_dist:
pg.draw.circle(self.game.screen, 'green', (100 * self.x, 100 * self.y), 15)
else:
pg.draw.circle(self.game.screen, 'red', (100 * self.x, 100 * self.y), 15)
if self.ray_cast_player_npc():
pg.draw.line(self.game.screen, 'orange', (100 * self.game.player.x, 100 * self.game.player.y),
(100 * self.x, 100 * self.y), 2)
(100 * self.x, 100 * self.y), 2)