sounds init

This commit is contained in:
Simon Kellet 2024-04-21 13:38:32 +01:00
parent aff6fa8cd3
commit 1e9953b3b7

View File

@ -27,6 +27,7 @@ function Bullet:update(dt)
and UserPlayer2.y < self.y + self.height
then
UserPlayer2.health = UserPlayer2.health - 1
GameSounds.hit:play()
Bullets1 = {}
end
end
@ -40,6 +41,7 @@ function Bullet:update(dt)
and UserPlayer1.y < self.y + self.height
then
UserPlayer1.health = UserPlayer1.health - 1
GameSounds.hit:play()
Bullets2 = {}
end
end
@ -52,6 +54,7 @@ function Bullet:update(dt)
elseif self.p == 2 then
Bullets2 = {}
end
GameSounds.hit:play()
end
end
end