aboutsummaryrefslogtreecommitdiff
path: root/players.lua
diff options
context:
space:
mode:
authorChris Bradley <1029chris@gmail.com>2022-02-19 14:11:05 -0800
committerChris Bradley <1029chris@gmail.com>2022-02-19 14:11:05 -0800
commit5ca492d316e5e37edb4054809ca3f18e055bd256 (patch)
tree1d1478b414425837fd277a8dbb9dcab090bba5f5 /players.lua
parent4f3bfa57d582d1f8a20da0c34cc7c94563570008 (diff)
optimized particles
Diffstat (limited to 'players.lua')
-rw-r--r--players.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/players.lua b/players.lua
index a6a7dc5..d87340c 100644
--- a/players.lua
+++ b/players.lua
@@ -99,14 +99,14 @@ function addplayer(x, y, sprite, bulletsprite)
end
-- addcircle(player.x-1, player.y, -0.5, 0, 1.5, 0.5, 9)
-- addcircle(player.x-1, player.y+7, -0.5, 0, 1.5, 0.5, 9)
- if player.health < 3 then
+ if player.health < 3 then --sparks
addcircle(player.x+rnd(8), player.y+rnd(8), rnd(1.5)-0.75, -1.5, 1, rnd(1)+0.5, rnd({9,10}), -0.1)
- if player.health < 2 then
- damagesmoke(player)
- end
end
player.particlecooldown = 0.1
end
+ if player.health < 2 then
+ damagesmoke(player)
+ end
--shooting after cooldown
player.shootcooldown -= ft