From 5ca492d316e5e37edb4054809ca3f18e055bd256 Mon Sep 17 00:00:00 2001 From: Chris Bradley <1029chris@gmail.com> Date: Sat, 19 Feb 2022 14:11:05 -0800 Subject: optimized particles --- players.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'players.lua') 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 -- cgit