attack now with left mouse click #73

Merged
Spafi merged 1 commit from Spafi/game:main into Development 2024-03-07 21:05:46 +01:00

View file

@ -162,7 +162,7 @@ class MainCharacter(Fighter):
self.y -= (2 + self.rect.height - (touches.rect.y - self.y))
return
elif isinstance(touches, NPC):
if keys[pg.K_SPACE]:
if keys[pg.K_f]:
touches.talk(objects)
return
else:
@ -201,7 +201,7 @@ class MainCharacter(Fighter):
def update(self, keys, mouse, objects):
if not self.talking:
self.walk(keys, objects)
if keys[pg.K_f]:
if pg.mouse.get_pressed()[0]:
self.attack(objects, vec(mouse))
self.speech.update(self)
if self.health.health <= 0: