summaryrefslogtreecommitdiff
path: root/objects/Player.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-13 16:11:23 +0800
committerEltrac <hi@guhub.cn>2025-03-13 16:11:23 +0800
commitc80deca77394890e4083724b7d29fea4e54b6be4 (patch)
tree5f505e26d3502f4f8e60c7ab81ad847374df693b /objects/Player.lua
parent57484f237e3f760a8c56cf20f05cef9f88153871 (diff)
feat(audio): "gets hit" sound
Diffstat (limited to 'objects/Player.lua')
-rw-r--r--objects/Player.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/objects/Player.lua b/objects/Player.lua
index b1f43f4..a91be76 100644
--- a/objects/Player.lua
+++ b/objects/Player.lua
@@ -98,6 +98,7 @@ function Player:onContact(other, contact)
-- if collision occurs, take it as an attack
if other.objectType == "enemy" then
if not (other.stunned or self:isShielded()) then
+ audio.play("getsHit")
table.remove(self.hearts)
-- shield this player
self.shieldedTill = G.time + config.playerShieldTime