aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2022-02-08 18:05:48 -0800
committer1029chris <1029chris@gmail.com>2022-02-08 18:05:48 -0800
commitf0dcc9e228896e5b923f019363c9b00147e5d85b (patch)
tree53af1f54a421a3b1bb1209f065b707d6eb1ff904
parenta96de58acd34d4be631759b236a36e23e11bbcca (diff)
little enemy sfx changes
-rw-r--r--enemies.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/enemies.lua b/enemies.lua
index 4489f65..f7936c5 100644
--- a/enemies.lua
+++ b/enemies.lua
@@ -32,7 +32,9 @@ function addbasicenemy(x, y, sprite, health, speed)
enemy.inv = 0.5
--and reduce health
enemy.health -= 1
- sfx(16)
+ if enemy.health > 0 then
+ sfx(16)
+ end
end
function enemy.collide(object)
@@ -67,7 +69,7 @@ function addbasicenemy(x, y, sprite, health, speed)
if shake < 3 then
shake = 2.5
end
- sfx(16)
+ sfx(17)
del(enemies, enemy)
end
end
@@ -201,6 +203,7 @@ function addballshooter(x, y, health, speed)
addbullet(enemy.x+4, enemy.y+4, sin(i/48)/2, cos(i/48)/2, true, 2)
end
end
+ sfx(15)
end
if enemy.x < -32 then
del(enemies, enemy)